예제 #1
0
        internal ToDoList Edit(ToDoList updated)
        {
            ToDoList original = GetById(updated.Id);

            if (updated.CreatorId != original.CreatorId)
            {
                throw new Exception("You cannot edit this.");
            }
            updated.Title = updated.Title != null ? updated.Title : original.Title;
            return(_repo.Edit(updated));
        }