public override bool DeleteRole(string roleName, bool throwOnPopulatedRole) { if (new UserDa(databasecontext).RoleExists(roleName)) { var role = new UserDa(databasecontext); var currentRole = role.GetRole(roleName); role.DeleteRole(currentRole); return true; } else return false; }
public void DeleteRole(int id) { var user = new UserDa(databasecontext); if (id > 0) { var currentRole = GetRoleById(id); user.DeleteRole(currentRole); } }