public void AddInventoryTaking(InventoryTaking inventory) { var _storevisit = Table.FirstOrDefault(o => o.StoreVisitId == inventory.StoreVisitId); _storevisit.InventoryTakings.Add(inventory); Update(_storevisit); }
public IActionResult AddInventoryTaking([FromBody] InventoryTaking inventory) { Repo.AddInventoryTaking(inventory); return(Ok(new { InventoryTakingId = inventory.InventoryTakingId })); }