public IActionResult NewBillDrink([FromBody] BillDrink billDrink) { try { unit.BillDrinks.AddBillDrink(billDrink); unit.Complete(); return(Ok("New bill drink added!")); } catch (Exception ex) { return(BadRequest("Failed to add bill drink, " + ex.ToString())); } }
public void RemoveBillDrink(BillDrink billDrink) { context.BillDrinks.Remove(billDrink); }
public void AddBillDrink(BillDrink billDrink) { context.BillDrinks.Add(billDrink); }