public DoBookItemApiController(CoreAppDbContext db, ILogger <DoBookItemApiController> logger, IBookitemService service,
                                IHostingEnvironment hostingEnvironment,
                                IHttpContextAccessor httpContextAccessor,
                                IRepository <DoBookItem> bookrep)
     : base(logger, service)
 {
     this.db                  = db;
     this._bookrep            = bookrep;
     this._service            = service;
     this.hostingEnvironment  = hostingEnvironment;
     this.httpContextAccessor = httpContextAccessor;
 }
 /// <summary>
 /// Injecting the CoreAppDbContext into the Repository Class
 /// </summary>
 /// <param name="ctx"></param>
 public ProductRepository(CoreAppDbContext ctx)
 {
     this.ctx = ctx;
 }
Пример #3
0
 public CategoryController(CoreAppDbContext context, IMemoryCache cache)
 {
     this.cache         = cache;
     this.context       = context;
     categoryRepository = new CategoryRepository(this.context);
 }
Пример #4
0
 public CoreAppRepository(CoreAppDbContext context)
 {
     _entities = context;
     _dbSet    = context.Set <T>();
 }
 /// <summary>
 /// Injecting the CoreAppDbContext into the Repository Class
 /// </summary>
 /// <param name="ctx"></param>
 public CategoryRepository(CoreAppDbContext ctx)
 {
     this.ctx = ctx;
 }
Пример #6
0
 public CategoryRepository(CoreAppDbContext context) : base(context)
 {
 }