public IHttpActionResult DeleteRole(int id) { Role role = _roleService.GetRole(id); if (role == null) { return(NotFound()); } _roleService.DeleteRole(role); _roleService.SaveRole(); return(Ok(role)); }
public DeleteRoleResponse Delete(DeleteRoleRequest request) { unitOfWork.BeginTransaction(); var role = roleService.DeleteRole(request.Id, request.Data.Version, true); unitOfWork.Commit(); // Notify. Events.UserEvents.Instance.OnRoleDeleted(role); return(new DeleteRoleResponse { Data = true }); }