Insert user via ASP.NET Identity

1

I'm developing an application in ASP.NET where I'm using Identity .

I have some initial functions coming from an external API that are called when I am validating the Token of this API via% p>

The fact is that I need it inside my controller , check if the user is already registered in my system and if it is not, I need to register it, all this within this controller, so that I can redirect the user for certain locations.

Follow the snippet of my code

        Rootobject DadosUser = new JavaScriptSerializer().Deserialize<Rootobject>(RetornoUser);

        var IDUsuario = DadosUser.id;
        var UsuarioLogin = DadosUser.nickname;
        var UsuarioPrimeiroNome = DadosUser.first_name;
        var UsuarioSegundoNome = DadosUser.last_name;
        var UsuarioEmail = DadosUser.email;



        ViewBag.UsuarioLogin = UsuarioLogin;
        ViewBag.NomeCompleto = UsuarioPrimeiroNome + " " + UsuarioSegundoNome;


        //INSERINDO NOVO USUARIO


      // Aqui preciso verificar se o usuario recebido ja existe no cadastro, e caso não, preciso cadastra-lo
    
asked by anonymous 31.07.2017 / 03:08

0 answers