Ejemplo n.º 1
0
        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.");
        }
Ejemplo n.º 2
0
 public void DeleteCapability(int capabilityId)
 {
     repo.Delete(repo._db.Capabilities.Find(capabilityId));
 }