Extending generated repositories

All generated repositories (one for each entity type) inherit the same base class which implements the KeepItSoft.Fwk.Core.Data.IRepository interface. In order to add a method to a repository, please follow the following steps :

  • Under the Partial folder of the Data.Repository.Interfaces project, create a partial interface for the repository you want to extend.
  • Define your method in this interface.
  • Under the Partial folder of the Data.Repository project, create a partial class for the repository you want to extend.

Implement your method in this class.

Advertisements