public UnitOfWork( FortuneDbContext context, IRepo <Location> locationRepo, IRepo <Trailer> trailerRepo, IRepo <Load> loadRepo, IRepo <EmailAuth> emailAuthRepo, IRepo <UserProfile> userProfileRepo, IRepo <Permission> permissionRepo ) { Contract.Assert(context != null); Contract.Assert(locationRepo != null); Contract.Assert(trailerRepo != null); Contract.Assert(loadRepo != null); Contract.Assert(emailAuthRepo != null); Contract.Assert(userProfileRepo != null); Contract.Assert(permissionRepo != null); this.disposed = false; this.context = context; this.LocationRepo = locationRepo; this.TrailerRepo = trailerRepo; this.LoadRepo = loadRepo; this.EmailAuthRepo = emailAuthRepo; this.UserProfileRepo = userProfileRepo; this.PermissionRepo = permissionRepo; }
public Repo(FortuneDbContext context) { this.context = context; this.dbSet = context.Set <TEntity>(); }