public CompanyWarehouse(DataContext context) { available = context.WarehouseOperations .Where(x => x.Distributor == null) .GroupBy(x => x.Product) .ToDictionary( operations => operations.Key, operations => operations.Sum( operation => operation.Type == WarehouseOperationType.Produced ? operation.Quantity : -operation.Quantity)); }
public ReferenceDataManager(DataContext context) { this.context = context; }
public SalesAnalytics(DataContext context) { this.context = context; }
public WarehouseManager(DataContext context) { this.context = context; }