public async Task <IActionResult> Register([FromBody] UsuarioToRegisterVM usuarioToRegisterVM)
        {
            var result = await service.Register(usuarioToRegisterVM);

            if (result == int.MinValue)
            {
                return(BadRequest("El usuario ya existe."));
            }
            return(Ok(result));
        }
 public UsuarioToRegisterVM GetEscaladorToCreateVM()
 {
     if (EscaladorToCreateVM == null)
     {
         var Participante = new Faker <ParticipanteToCreateVM>()
                            .RuleFor(g => g.Nombre, f => f.Name.FirstName())
                            .RuleFor(g => g.Apellido, f => f.Name.LastName())
                            .RuleFor(g => g.Correo, f => f.Person.Email)
                            .RuleFor(g => g.Genero, f => f.PickRandom((int)GeneroEnum.Masculino, (int)GeneroEnum.Femenino))
                            .RuleFor(g => g.AñosExperiencia, f => f.Random.Number(1, 10))
                            .RuleFor(g => g.Calificacion, f => f.Random.Number(1, 20))
                            .RuleFor(g => g.FechaNacimiento, f => f.Date.Past())
                            .RuleFor(g => g.IdLineaCarrera, f => f.PickRandom((int)LineaCarreraEnum.BusinessAnalyst, (int)LineaCarreraEnum.SoftwareEngineer, (int)LineaCarreraEnum.DevOpsEngineer,
                                                                              (int)LineaCarreraEnum.MobileEngineer, (int)LineaCarreraEnum.QualityAssurance))
                            .RuleFor(g => g.IdNivel, f => (int)NivelEnum.Senior);
         EscaladorToCreateVM = new Faker <UsuarioToRegisterVM>()
                               .RuleFor(g => g.Username, f => f.Person.UserName)
                               .RuleFor(g => g.Password, f => "12345")
                               .RuleFor(g => g.IdRol, f => (int)RolEnum.Escalador)
                               .RuleFor(g => g.Participante, f => Participante);
     }
     return(EscaladorToCreateVM);
 }