public UnitOfWork(ITechrepoDbContext context) { // TODO: Global validations if (context == null) { throw new ArgumentNullException("Context cannot be null"); } this.dbContext = context; }
public GenericRepository(ITechrepoDbContext context) { if (context == null) { throw new ArgumentException("An instance of DbContext is required to use this repository.", nameof(context)); } this.Context = context; this.DbSet = this.Context.Set <T>(); }
public FakeGenericRepository(ITechrepoDbContext context) : base(context) { }
public AdvertsService(ITechrepoDbContext techrepoContext) { this.techrepoContext = techrepoContext; }