Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EFPT: Navigation named xxxNavigation #656

Closed
ErikEJ opened this issue Mar 12, 2018 · 2 comments
Closed

EFPT: Navigation named xxxNavigation #656

ErikEJ opened this issue Mar 12, 2018 · 2 comments

Comments

@ErikEJ
Copy link
Owner

ErikEJ commented Mar 12, 2018

Another difference between EF6 reverse engineering is that I have a table named Segment, and another one called Field. A field has a navigation property to Segment. Instead of the name being Field.Segment as it was in EF6, it called is Field.SegmentNameNavigation

    private Segment m_SegmentNameNavigation;
    public Segment SegmentNameNavigation
    {
       get { return m_SegmentNameNavigation; }
       set
       {
         if(m_SegmentNameNavigation != value)
         {
            m_SegmentNameNavigation = value;
            OnPropertyChanged();
         }
       }
    }

This is the only navigation property that seems to get named differently than EF6.

The modelbuilder code generated for this entity is:

        modelBuilder.Entity<Segment>(entity =>
        {
            entity.HasKey(e => e.Name);

            entity.ToTable("Segment");

            entity.Property(e => e.Name)
                .HasColumnType("nvarchar(3)")
                .ValueGeneratedNever();

            entity.Property(e => e.Description).HasColumnType("nvarchar(1024)");
        });

This is the only navigation property that seems to get named differently than EF6.

The modelbuilder code generated for this entity is:

        modelBuilder.Entity<Segment>(entity =>
        {
            entity.HasKey(e => e.Name);

            entity.ToTable("Segment");

            entity.Property(e => e.Name)
                .HasColumnType("nvarchar(3)")
                .ValueGeneratedNever();

            entity.Property(e => e.Description).HasColumnType("nvarchar(1024)");
        });

@jonreis

@ErikEJ
Copy link
Owner Author

ErikEJ commented Mar 15, 2018

I believ this is "by design"

@ErikEJ ErikEJ closed this as completed Mar 15, 2018
@jonreis
Copy link

jonreis commented Mar 15, 2018

Sounds like #604 will provide a work-around for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants