internal string Delete(int id, string userId) { Member foundMember = GetById(id); if (foundMember.UserId != userId) { throw new Exception("This isn't you."); } if (_repo.Delete(id, userId)) { return("Successfully Deleted."); } throw new Exception("Something didn't work."); }
public void DeleteCapability(int capabilityId) { repo.Delete(repo._db.Capabilities.Find(capabilityId)); }