public async Task <IActionResult> CreateInventory([FromBody] InventoryTO inventory)
        {
            try
            {
                await _inventoryService.CreateInventory(inventory);

                return(Ok());
            }
            catch (Exception e)
            {
                return(StatusCode(500, e));
            }
        }
Exemplo n.º 2
0
 public async Task CreateInventory(InventoryTO inventory)
 {
     inventory.DateLastUpdated = DateTime.Now;
     await _iInventoryRepository.CreateInventory(new Inventory(inventory));
 }