How to retrieve Entity Configuration from Fluent Api

.net c# ef-fluent-api entity-framework entity-framework-6

Question

I can build up the setup using Fluent Api and Entity-Framework 6 as follows:

public class ApplicationUserConfiguration : EntityTypeConfiguration<ApplicationUser>
{
    public ApplicationUserConfiguration()
    {
        this.HasKey(d => d.Id);
        this.Ignore(d => d.UserId);
    }
}

origin: this inquiry

I can determine the role properties via reflection using the attribute technique, but I'm curious how to get these settings, like asKey for instance, using the Fluent Api method?

No public property exists from theEntityTypeConfiguration<> class.

Is it feasible to get theKey and ForeignKey somehow?

1
10
12/19/2019 5:49:44 PM

Accepted Answer

ZZZ_tmp
8
10/7/2019 10:14:02 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow