0

I am trying to set up my entity framework edmx model to integrate with the asp .net identity tables. Unfortunately to use the UserManager and other managing classes, I need to derive my entities from base class IdentiUser, IdentityRole and so on. How can I do this?

And if I derive them, they already define some properties with the exact names as in the database and they will only get shadowed by the properties generated by EF when I update the model from the database.

1 Answer 1

1

You only need to Provide implementations of those classes' interfaces. You can locate their specific interfaces using the docs or intellisense.

For example:

public class MyUser :IUser
{
    string IUser.Id
    {
        get { return Id.ToString(); }
    }

    public int Id { get; set; }
    public string UserName { get; set; }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.