internal Drink Edit(Drink editDrink) { Drink original = Get(editDrink.Id); original.Title = editDrink.Title != null ? editDrink.Title : original.Title; original.Description = editDrink.Description != null ? editDrink.Description : original.Description; original.Price = editDrink.Price > 0 ? editDrink.Price : original.Price; return(_repo.Edit(original)); }
internal Drink Edit(Drink editDrink) { Drink original = Get(editDrink.Id); original.Name = editDrink.Name != null ? editDrink.Name : original.Name; original.Price = editDrink.Price > 0 ? editDrink.Price : original.Price; return(_repo.Edit(original)); }