public ShopCommand(IShopDbContext dbContext, IModelsFactory modelsFactory) { Guard.WhenArgument(dbContext, DbContextCheck).IsNull().Throw(); Guard.WhenArgument(modelsFactory, ModelsFactoryCheck).IsNull().Throw(); this.DbContext = dbContext; this.ModelsFactory = modelsFactory; }
public GenericDataBaseRepository(IShopDbContext context) { Context = context ?? throw new ArgumentNullException(nameof(context)); Entities = context.Set <TEntity>(); Entities.Load(); }
public GenericRepository(IShopDbContext context) { if (context == null) { throw new ArgumentException("An instance of DbContext is required to use this repository.", "context"); } this.Context = context; this.DbSet = this.Context.Set <T>(); }
public CommandsFactory(IMovieTheaterDbContext movieDbContext, IStaffDbContext staffDbContext, IShopDbContext shopDbContext, IModelsFactory factory, IExporter exporter, IFileProviderFactory fileProviderFactory) { Guard.WhenArgument(movieDbContext, DbContextCheck).IsNull().Throw(); Guard.WhenArgument(factory, ModelsFactoryCheck).IsNull().Throw(); Guard.WhenArgument(exporter, ExporterCheck).IsNull().Throw(); Guard.WhenArgument(fileProviderFactory, FileProviderFactoryCheck).IsNull().Throw(); this.moviesDbContext = movieDbContext; this.modelsFactory = factory; this.staffDbContext = staffDbContext; this.shopDbContext = shopDbContext; this.exporter = exporter; this.fileProviderFactory = fileProviderFactory; }
public UnitOfWork( IShopDbContext context, IOrdersRepository orders, IProductsCategoriesRepository categories, IProductsRepository products, IStagesRepository stages ) { _context = context; Orders = orders; Categories = categories; Products = products; Stages = stages; _isDisposed = false; }
private void Dispose(bool isDisposing) { if (_isDisposed) { return; } if (isDisposing) { Orders = null; Categories = null; Products = null; Stages = null; } _context.Dispose(); _context = null; _isDisposed = true; }
public OrdersRepository(IShopDbContext context) : base(context) { }
public CreateVendorCommandHandler(IShopDbContext dbContext) { this.dbContext = dbContext; }
public ProductCategoriesRepository(IShopDbContext context) : base(context) { }
public ProductsRepository(IShopDbContext context) : base(context) { }
public GetProductsByCategoryQueryHandler(IShopDbContext dbContext) { _dbContext = dbContext; }
public ProductOperations(ShopDbContext shopContext) { DatabaseContext = shopContext; }
public GetVendorByIdQueryHandler(IShopDbContext dbContext) { this.dbContext = dbContext; }
public GetAllCategoriesQueryHandler(IShopDbContext dbContext, ICacheService cacheService) { _dbContext = dbContext; _cacheService = cacheService; }
public GetAllVendorsQueryHandler(IShopDbContext dbContext) { this.dbContext = dbContext; }
public RepositoryBase(IShopDbContext context, IMapper mapper) { this._shopDbContext = context; this.Set = this._shopDbContext.Set <TDataEntity>(); this.Mapper = mapper; }
public OrderRepository(IShopDbContext dbContext, ICacheService cacheService) { _dbContext = dbContext; _cacheService = cacheService; }
public StagesRepository(IShopDbContext context) : base(context) { }
public GetFeaturedProductsQueryHandler(IShopDbContext dbContext) { _dbContext = dbContext; }
public CreateShopCommand(IShopDbContext dbContext, IModelsFactory modelsFactory) : base(dbContext, modelsFactory) { }
public DeleteProductCommandHandler(IShopDbContext dbContext) { _dbContext = dbContext; }
public GetAllProductsQueryHandler(IShopDbContext dbContext) { this.dbContext = dbContext; }
public PostProvider(IShopDbContext shopDbContext, IMapper mapper) { _mapper = mapper; _shopDbContext = shopDbContext; }
public UpdateProductCommandHandler(IShopDbContext dbContext, IUploadImageService imageService) { _dbContext = dbContext; _imageService = imageService; }
public GetProductByIdQueryHandler(IShopDbContext dbContext) { _dbContext = dbContext; }
public BaseRepositoryEF(IShopDbContext dbContext) { _dbContext = dbContext; }