public IActionResult RoleExists([FromQuery] RoleExists model)
        {
            var result = _unitOfWork.RoleExists(model);

            if (result)
            {
                return(Ok());
            }

            return(NotFound());
        }
Ejemplo n.º 2
0
 public bool RoleExists(RoleExists model)
 {
     return(RoleRepository
            .Entities
            .Any(co => co.Name == model.Name));
 }