internal Side Edit(Side editSide) { Side original = Get(editSide.Id); original.Name = editSide.Name != null ? editSide.Name : original.Name; original.Price = editSide.Price > 0 ? editSide.Price : original.Price; return(_repo.Edit(original)); }
internal Side Edit(Side editSide) { Side original = Get(editSide.Id); original.Name = editSide.Name.Length > 0 ? editSide.Name : original.Name; original.Description = editSide.Description.Length > 0 ? editSide.Description : original.Description; original.Price = editSide.Price > 0 ? editSide.Price : original.Price; _repo.Edit(original); return(original); }
internal object EditSide(Side newSide) { //FIXME Side original = GetSideById(newSide.Id); original.Name = newSide.Name != null ? newSide.Name : original.Name; original.Description = newSide.Description != null ? newSide.Description : original.Description; original.Price = newSide.Price > 0 ? newSide.Price : original.Price; return(_repo.Edit(original)); }