I am using this tutorial to add a couple fields to the user table. In my code I have the following lines:
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.Entity<ApplicationUser>()
.Property(e => e.RegistrationDate);
builder.Entity<ApplicationUser>()
.Property(e => e.RegistrationIPAddress);
builder.Entity<ApplicationUser>()
.Property(e => e.Banned);
}
I have looked up lambda expression which I believe is what this is, but I'm not understanding what these lines do, and why they are required, i.e.:
What is the point of the RegistrationDate line and what is it doing?
Do I need to add these lines for every new field I add to the user table?
This is my first time working with Entity Framework and all of the documents are getting a little confusing.
Thanks.