internal void Delete(int id, Profile userInfo) { var data = _repo.GetById(id); if (data.CreatorId != userInfo.Id) { throw new Exception("Invalid Permissions to Delete"); } _repo.Delete(id); }
internal void Delete(int id) { var data = _repo.GetById(id); if (data == null) { throw new Exception("Invalid Id"); } _repo.Delete(id); }