public static async Task <IActionResult> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] //TODO: HTTP method (access level and verb) HttpRequest req, //TODO: not used ILogger log) { var orderId = Guid.NewGuid(); log.LogWarning("Getting all possible combos for this order"); //TODO: wrong log level and no identifier specified var comboRepository = new ComboRepository(); var comboService = new ComboService(); var combos = comboService.GetMashedPotatoesCombo(); return(new OkObjectResult($"Here are the possible orders for order Id {orderId}: {combos}")); //TODO: needs to be serialized into JSON and should only return object }
public UnitOfWork(DataContext dataContext) { _dataContext = dataContext; EmployeeRepository = new EmployeeRepository(_dataContext); CustomerRepository = new CustomerRepository(_dataContext); ProviderRepository = new ProviderRepository(_dataContext); SupplyRepository = new SupplyRepository(_dataContext); SupplyInvoiceDetailRepository = new SupplyInvoiceDetailRepository(_dataContext); SupplyInvoiceRepository = new SupplyInvoiceRepository(_dataContext); TableRepository = new TableRepository(_dataContext); ComboRepository = new ComboRepository(_dataContext); ComboDetailRepository = new ComboDetailRepository(_dataContext); ComboImageRepository = new ComboImageRepository(_dataContext); DishSuppliesRepository = new DishSuppliesRepository(_dataContext); DishRepository = new DishRepository(_dataContext); DishCategoryRepository = new DishCategoryRepository(_dataContext); DishImageRepository = new DishImageRepository(_dataContext); OrderRepository = new OrderRepository(_dataContext); OrderTypeRepository = new OrderTypeRepository(_dataContext); OrderDetailRepository = new OrderDetailRepository(_dataContext); CurrentInventorySupplyRepository = new CurrentInventorySupplyRepository(_dataContext); InventorySupplyTransactionRepository = new InventorySupplyTransactionRepository(_dataContext); UserRepository = new UserRepository(dataContext); }
public ComboService(ComboRepository repo) { _repo = repo; }
ComboRepository _comboRepository; //TODO: should use IComboRepository instead public ComboService() //TODO: no logging present { //TODO: Dependency Injection _comboRepository = new ComboRepository(); }