internal Vault Edit(Vault updated) { Vault original = _repo.GetById(updated.Id); if (updated.CreatorId != original.CreatorId) { throw new Exception("You can only edit your own data"); } updated.Name = updated.Name != null ? updated.Name : original.Name; updated.Description = updated.Description != null ? updated.Description : original.Description; return(_repo.Edit(updated)); }