public GarmentLeftoverWarehouseStockService(InventoryDbContext dbContext, IServiceProvider serviceProvider) { DbContext = dbContext; DbSetStock = DbContext.Set <GarmentLeftoverWarehouseStock>(); DbSetStockHistory = DbContext.Set <GarmentLeftoverWarehouseStockHistory>(); ServiceProvider = serviceProvider; IdentityService = (IIdentityService)serviceProvider.GetService(typeof(IIdentityService)); }
public ReportRecapStockGreigePerTypeService(IServiceProvider serviceProvider, InventoryDbContext dbContext) { DbContext = dbContext; ServiceProvider = serviceProvider; DbSetItem = dbContext.Set <InventoryWeavingDocumentItem>(); DbSetMovement = dbContext.Set <InventoryWeavingMovement>(); DbSetDoc = dbContext.Set <InventoryWeavingDocument>(); IdentityService = serviceProvider.GetService <IIdentityService>(); //IdentityService = serviceProvider.GetService<IIdentityService>(); }
public FpReturnFromBuyerService(InventoryDbContext dbContext, IServiceProvider serviceProvider, IInventoryDocumentService inventoryDocumentService) { _dbContext = dbContext; _identityService = serviceProvider.GetService <IIdentityService>(); _inventoryDocumentService = inventoryDocumentService; _dbSet = dbContext.Set <FpReturnFromBuyerModel>(); _dbDetailSet = dbContext.Set <FpReturnFromBuyerDetailModel>(); _dbItemSet = dbContext.Set <FpReturnFromBuyerItemModel>(); }
public InventoryWeavingDocumentOutService(IServiceProvider serviceProvider, InventoryDbContext dbContext) { DbContext = dbContext; ServiceProvider = serviceProvider; DbSetItem = dbContext.Set <InventoryWeavingDocumentItem>(); DbSetMovement = dbContext.Set <InventoryWeavingMovement>(); DbSetDoc = dbContext.Set <InventoryWeavingDocument>(); IdentityService = serviceProvider.GetService <IIdentityService>(); //IdentityService = serviceProvider.GetService<IIdentityService>(); }
public GarmentLeftoverWarehouseExpenditureAccessoriesService(InventoryDbContext dbContext, IServiceProvider serviceProvider) { DbContext = dbContext; DbSet = DbContext.Set <GarmentLeftoverWarehouseExpenditureAccessories>(); DbSetItem = DbContext.Set <GarmentLeftoverWarehouseExpenditureAccessoriesItem>(); ServiceProvider = serviceProvider; IdentityService = (IIdentityService)serviceProvider.GetService(typeof(IIdentityService)); StockService = (IGarmentLeftoverWarehouseStockService)serviceProvider.GetService(typeof(IGarmentLeftoverWarehouseStockService)); }
public InventoryWeavingDocumentUploadService(IServiceProvider serviceProvider, InventoryDbContext dbContext) { DbContext = dbContext; ServiceProvider = serviceProvider; DbSet = dbContext.Set <InventoryWeavingDocument>(); DbSet2 = dbContext.Set <InventoryWeavingMovement>(); DbSet3 = dbContext.Set <InventoryWeavingDocumentItem>(); IdentityService = serviceProvider.GetService <IIdentityService>(); movementService = (IInventoryWeavingMovementService)serviceProvider.GetService(typeof(IInventoryWeavingMovementService)); //movementService = serviceProvider.GetService<IInventoryWeavingMovementService>(); }
public GarmentLeftoverWarehouseExpenditureFabricService(InventoryDbContext dbContext, IServiceProvider serviceProvider) { DbContext = dbContext; DbSet = DbContext.Set <GarmentLeftoverWarehouseExpenditureFabric>(); DbSetItem = DbContext.Set <GarmentLeftoverWarehouseExpenditureFabricItem>(); ServiceProvider = serviceProvider; IdentityService = (IIdentityService)serviceProvider.GetService(typeof(IIdentityService)); StockService = (IGarmentLeftoverWarehouseStockService)serviceProvider.GetService(typeof(IGarmentLeftoverWarehouseStockService)); GarmentUnitReceiptNoteUri = APIEndpoint.Purchasing + "garment-unit-expenditure-notes/"; GarmentCoreProductUri = APIEndpoint.Core + "master/garmentProducts"; }
public NewFpRegradingResultDocsService(IServiceProvider serviceProvider, InventoryDbContext dbContext) { DbContext = dbContext; ServiceProvider = serviceProvider; DbSet = dbContext.Set <Models.FpRegradingResultDocs>(); IdentityService = serviceProvider.GetService <IIdentityService>(); }
public NewMaterialDistributionNoteService(IServiceProvider serviceProvider, InventoryDbContext dbContext) { DbContext = dbContext; ServiceProvider = serviceProvider; DbSet = dbContext.Set <MaterialDistributionNote>(); IdentityService = serviceProvider.GetService <IIdentityService>(); }
public StockTransferNoteRepository(IServiceProvider serviceProvider, InventoryDbContext dbContext) { DbContext = dbContext; ServiceProvider = serviceProvider; DbSet = dbContext.Set <StockTransferNote>(); IdentityInterface = serviceProvider.GetService <IIdentityInterface>(); }
public NewStockTransferNoteService(IServiceProvider serviceProvider, InventoryDbContext dbContext) { DbContext = dbContext; ServiceProvider = serviceProvider; DbSet = dbContext.Set <StockTransferNote>(); IdentityService = serviceProvider.GetService <IIdentityService>(); }
public InventorySummaryService(IServiceProvider serviceProvider, InventoryDbContext dbContext) { DbContext = dbContext; ServiceProvider = serviceProvider; DbSet = dbContext.Set <InventorySummary>(); IdentityService = serviceProvider.GetService <IIdentityService>(); }
public InventoryDocumentRepository(IServiceProvider serviceProvider, InventoryDbContext dbContext) { _inventoryDbContext = dbContext; _serviceProvider = serviceProvider; _dbSet = dbContext.Set <InventoryDocument>(); _identityInterface = serviceProvider.GetService <IIdentityInterface>(); }
public MaterialRequestNoteRepository(IServiceProvider serviceProvider, InventoryDbContext dbContext) { _inventoryDbContext = dbContext; _serviceProvider = serviceProvider; _dbSet = dbContext.Set <MaterialsRequestNote>(); _identityInterface = serviceProvider.GetService <IIdentityInterface>(); }
public InventoryDystuffService(IServiceProvider serviceProvider, InventoryDbContext dbContext) { DbContext = dbContext; ServiceProvider = serviceProvider; DbSet = dbContext.Set <InventoryMovement>(); IdentityService = serviceProvider.GetService <IIdentityService>(); }
public NewFPReturnInvToPurchasingService(IServiceProvider serviceProvider, InventoryDbContext dbContext) { DbContext = dbContext; ServiceProvider = serviceProvider; DbSet = dbContext.Set <FPReturnInvToPurchasing>(); IdentityService = serviceProvider.GetService <IIdentityService>(); }
public ReceiptAvalMonitoringService(InventoryDbContext dbContext, IServiceProvider serviceProvider) { DbContext = dbContext; DbSet = DbContext.Set <GarmentLeftoverWarehouseReceiptAval>(); ServiceProvider = serviceProvider; IdentityService = (IIdentityService)serviceProvider.GetService(typeof(IIdentityService)); }
public IEnumerable <T> GetAll(string[] includes = null) { //HANDLE INCLUDES FOR ASSOCIATED OBJECTS IF APPLICABLE if (includes != null && includes.Count() > 0) { var query = dataContext.Set <T>().Include(includes.First()); foreach (var include in includes.Skip(1)) { query = query.Include(include); } return(query.AsQueryable()); } return(dataContext.Set <T>().AsQueryable()); }
public GarmentLeftoverWarehouseExpenditureFinishedGoodService(InventoryDbContext dbContext, IServiceProvider serviceProvider) { DbContext = dbContext; DbSet = DbContext.Set <GarmentLeftoverWarehouseExpenditureFinishedGood>(); ServiceProvider = serviceProvider; IdentityService = (IIdentityService)serviceProvider.GetService(typeof(IIdentityService)); StockService = (IGarmentLeftoverWarehouseStockService)serviceProvider.GetService(typeof(IGarmentLeftoverWarehouseStockService)); }
public GarmentLeftoverWarehouseReceiptAccessoriesService(InventoryDbContext dbContext, IServiceProvider serviceProvider) { DbContext = dbContext; DbSet = DbContext.Set <GarmentLeftoverWarehouseReceiptAccessory>(); ServiceProvider = serviceProvider; IdentityService = (IIdentityService)serviceProvider.GetService(typeof(IIdentityService)); StockService = (IGarmentLeftoverWarehouseStockService)serviceProvider.GetService(typeof(IGarmentLeftoverWarehouseStockService)); GarmentUnitReceiptNoteUri = APIEndpoint.Purchasing + "garment-unit-expenditure-notes/"; }
public GarmentLeftoverWarehouseReceiptFinishedGoodService(InventoryDbContext dbContext, IServiceProvider serviceProvider) { DbContext = dbContext; DbSet = DbContext.Set <GarmentLeftoverWarehouseReceiptFinishedGood>(); ServiceProvider = serviceProvider; IdentityService = (IIdentityService)serviceProvider.GetService(typeof(IIdentityService)); StockService = (IGarmentLeftoverWarehouseStockService)serviceProvider.GetService(typeof(IGarmentLeftoverWarehouseStockService)); GarmentExpenditureGoodUri = APIEndpoint.GarmentProduction + "expenditure-goods/"; }
public GarmentLeftoverWarehouseReceiptAvalService(InventoryDbContext dbContext, IServiceProvider serviceProvider) { DbContext = dbContext; DbSet = DbContext.Set <GarmentLeftoverWarehouseReceiptAval>(); ServiceProvider = serviceProvider; IdentityService = (IIdentityService)serviceProvider.GetService(typeof(IIdentityService)); StockService = (IGarmentLeftoverWarehouseStockService)serviceProvider.GetService(typeof(IGarmentLeftoverWarehouseStockService)); GarmentAvalProductUri = APIEndpoint.GarmentProduction + "aval-products/"; GarmentAvalComponentUri = APIEndpoint.GarmentProduction + "aval-components/"; }
public ReceiptMonitoringService(InventoryDbContext dbContext, IServiceProvider serviceProvider) { DbContext = dbContext; DbSet = DbContext.Set <GarmentLeftoverWarehouseReceiptFabric>(); ServiceProvider = serviceProvider; IdentityService = (IIdentityService)serviceProvider.GetService(typeof(IIdentityService)); //StockService = (IGarmentLeftoverWarehouseStockService)serviceProvider.GetService(typeof(IGarmentLeftoverWarehouseStockService)); GarmentCustomsUri = APIEndpoint.Purchasing + "garment-beacukai/by-poserialnumber"; }
public GarmentLeftoverWarehouseReceiptFinishedGoodService(InventoryDbContext dbContext, IServiceProvider serviceProvider) { DbContext = dbContext; DbSet = DbContext.Set <GarmentLeftoverWarehouseReceiptFinishedGood>(); ServiceProvider = serviceProvider; IdentityService = (IIdentityService)serviceProvider.GetService(typeof(IIdentityService)); StockService = (IGarmentLeftoverWarehouseStockService)serviceProvider.GetService(typeof(IGarmentLeftoverWarehouseStockService)); GarmentExpenditureGoodUri = APIEndpoint.GarmentProduction + "expenditure-goods/"; GarmentUnitDeliveryOrder = APIEndpoint.Purchasing + "garment-unit-delivery-orders/leftoverwarehouse"; GarmentCustomsUri = APIEndpoint.Purchasing + "garment-beacukai/by-poserialnumbers"; }
/// <summary> /// Deletes the specified predicate. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="predicate">The predicate.</param> public void Delete <T>(Expression <Func <T, bool> > predicate) where T : class { try { List <T> instance = inventoryDbContext.Set <T>().Where(predicate).ToList(); if (instance.Any()) { foreach (var item in instance) { if (item != null) { inventoryDbContext.Set <T>().Remove(item); } } } } catch (Exception ex) { LogHelper.LogException(ex, MethodBase.GetCurrentMethod().Name); } }
public Repository(InventoryDbContext context) { Context = context; _dbSet = Context.Set <TEntity>(); }
public InventoryMovementFacade(IServiceProvider serviceProvider, InventoryDbContext dbContext) { this.serviceProvider = serviceProvider; this.dbContext = dbContext; this.dbSet = dbContext.Set <InventoryMovement>(); }
public InventorySummaryFacade(IServiceProvider serviceProvider, InventoryDbContext dbContext) { this.serviceProvider = serviceProvider; this.dbContext = dbContext; this.dbSet = dbContext.Set <InventorySummary>(); }
public Repository() { context = new InventoryDbContext(); DbSet = context.Set <T>(); }
public virtual async Task <T> GetByIdAsync(int id) { return(await _dbContext.Set <T>().FindAsync(id)); }