예제 #1
0
 public UnitOfWork(ITechrepoDbContext context)
 {
     // TODO: Global validations
     if (context == null)
     {
         throw new ArgumentNullException("Context cannot be null");
     }
     this.dbContext = context;
 }
예제 #2
0
        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)
 {
 }
예제 #4
0
 public AdvertsService(ITechrepoDbContext techrepoContext)
 {
     this.techrepoContext = techrepoContext;
 }