Skip to content

An implementation of M.Repository abstraction using EntityFramework.

License

Notifications You must be signed in to change notification settings

petar-m/repository.ef

Repository files navigation

Repository.Ef

NuGet

An implementation of M.Repository abstraction using EntityFramework.

Setup

  • Inherit Entity<TKey> in order to use IRepository<TEntity>.

example:

public class Item : Entity<int>
{
    public string InventoryNumber { get; set; }
    public int Quantity { get; set; }
}
  • Setup repositories and unit of work with concrete implementations.

example (pseudo code):

For<IRepository<>>().Use<Repository<>>();
For<IUnitOfWork>().Use<UnitOfWork>();  
  • To use asynchronous queries setup QueryableAsyncExtensionsProxy with EfQueryableAsyncExtensions.

example:

QueryableAsyncExtensionsProxy.Initialize(new EfQueryableAsyncExtensions()); 

About

An implementation of M.Repository abstraction using EntityFramework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages