ASP.NET Identity customize on its own basis

Asked

Viewed 475 times

2

I already have my base ready with the login table, and I didn’t want to change it, so I wonder if it has how to customize it with the tables I already have! and how to do this!

Below the mapping of the login table in my base:

public partial class cnet_logon
{
    public long id_pessoa { get; set; }
    public long id_pessoaContato { get; set; }
    public string userpassword { get; set; }
    public bool ativoAcesso { get; set; }
    public bool ativoConsumo { get; set; }
    public virtual ncl_pessoa ncl_pessoa { get; set; }
    public virtual ncl_pessoaContato ncl_pessoaContato { get; set; }
}
  • You can put how is your code in the body of the question?

  • So actually I just have the database mapping ready with the classes, I don’t know how to consume and adapt with Asp.net Identity to make the authentication

  • Favorite. Giving a break in my projects I make a very complete reply to you.

  • Okay, thank you very much, I’ll be waiting

1 answer

1

As it uses the Entity Framework to access users, simply map their user class and provide context for the UserStore.

  • But as I could do this, it is my first time working with Asp.net Identity, I would like to send an example?

  • It is a question more connected to the Entity Framework than to the ASP.NET Identity itself. How does the code access the database? Does it use Entity Framework, another pure ORM or ADO.NET? UserStore. Otherwise, you will need custom implementations of IUserStore.

  • is via ENTITY FRAMEWORK

  • the q part I don’t understand is how I would join the table I have with Userstore.Have some example?

  • Does the Entity Framework not have the context class of its user table? You should use it to instantiate a Userstore object, which it does the operations necessary for you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.