internal WishList Edit(WishList update) { var original = GetById(update.Id); if (original == null) { throw new Exception("Bad Request"); } update.Title = update.Title != null ? update.Title : original.Title; return(_repo.Edit(update)); }
internal WishList Edit(WishList updated) { var original = GetById(updated.Id); if (original.CreatorId != updated.CreatorId) { throw new Exception("Invalid Edit Permissions"); } updated.Title = updated.Title != null ? updated.Title : original.Title; return(_repo.Edit(updated)); }