Classes and interfaces

In this section, each class and interface of the concept will be explained in details.

Kipon.Xrm.IRepository<T>

Interface that represent CRUD operation for a specific entity T, where T extends Microsoft.Xrm.Sdk.Entity.

Actually implementations are generated by the crmsvcutil.

Specific types can be injected into any plugin step or service constructor, ex Kipon.Xrm.IRepository<Entities.Account>

  • IQueryable<T> GetQuery()

    Get a query you can use to do Linq based queries fetching the entity type represented by T

  • T GetById(Guid id)

    The the instance of T that has the id represented by the parameter. This method will throw an exception if no record of type T exists with that id

  • void Delete(T entity)

    Delete the record T from the database

  • void Add(T entity)

    Create a new instance of entity T according to the payload of T

  • void Update(T entity)

    Update the instance T, saving information to the database

  • void Attach(T entity)

    Attach entity to the service cache. (rarely used, and the Kipon framework is overwriting the default behavior of the CRM context, so nothing is cached by default)

  • void Detach(T entity)

    Remove the instance from the cache.

© Kipon ApS 2020, 2021, 2022, 2023. All content on the page is the property of Kipon ApS. Any republish or copy of this content is a violation. The content of this site is NOT open source, and cannot be copied, republished or used in any context without explcit permission from the owner.