public async Task <ActionResult <InventoryReport> > AddDeliveryReport([FromBody] InventoryReport report) { if (!ModelState.IsValid) { Console.WriteLine("Invalid state..."); return(BadRequest(ModelState)); } var newReport = await _inventoryRepository.AddInventoryReport(report); return(CreatedAtAction(nameof(GetAllInventoryReport), new { id = newReport.Id }, newReport)); }