public IActionResult RoleExists([FromQuery] RoleExists model) { var result = _unitOfWork.RoleExists(model); if (result) { return(Ok()); } return(NotFound()); }
public bool RoleExists(RoleExists model) { return(RoleRepository .Entities .Any(co => co.Name == model.Name)); }