コード例 #1
0
        internal Whiteboard Edit(Whiteboard updated)
        {
            Whiteboard original = GetById(updated.Id);

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