What exactly is the function of the Identitymodels class in C# and how does Applicationdbcontext work?

Asked

Viewed 18 times

1

I developed an application in C# where I have the class Identitymodels, where from it I created a list of my classes based on Applicationdbcontext. I used Migrations to create the tables in the database from these classes, but wanted to understand the technical concept of using Identitymodels and Applicationdbcontext.

My code in the Identitymodels class

public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
    public DbSet<Company> Companies { get; set; }
    public DbSet<Category> Categories{ get; set; }

    public ApplicationDbContext()
        : base("DefaultConnection", throwIfV1Schema: false)
    {
    }

    public static ApplicationDbContext Create()
    {
        return new ApplicationDbContext();
    }
No answers

Browser other questions tagged

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