public int InsertUser([FromBody] APIUsers.Library.Models.UserMin value)
        {
            int id = 0;
            var ConnectionStringLocal = _configuration.GetValue <string>("ServidorLocal");

            using (IUser User = Factorizador.CrearConexionServicio(APIUsers.Library.Models.ConnectionType.MSSQL, ConnectionStringLocal))
            {
                id = User.InsertUser(value.Nick, Functions.GetSHA256(value.Password));
            }
            return(id);
        }
        public bool UpdateRefreshToken(APIUsers.Library.Models.UserMin user)
        {
            List <SqlParameter> _Parametros = new List <SqlParameter>();

            try
            {
                _Parametros.Add(new SqlParameter("@Nick", user.Nick));
                _Parametros.Add(new SqlParameter("@RefreshToken", (object)user.RefreshToken ?? DBNull.Value));
                sql.PrepararProcedimiento("dbo.[USER.UpdateRefreshToken]", _Parametros);
                sql.EjecutarProcedimiento().ToString();
                //return 0;
                return(true);
            }
            catch (SqlException sqlEx)
            {
                throw new Exception(sqlEx.Message, sqlEx);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }