EF Core 2.0 Identity - Adding navigation properties

后端 未结 3 1253
面向向阳花
面向向阳花 2021-01-02 21:58

In EF Core 2.0 Identity navigation properties are not included by default, so after upgrading, I added them. So for Many-To-Many relationship between User and Role, and One

3条回答
  •  庸人自扰
    2021-01-02 22:33

    I've encountered the same. In my case the problem was caused because I had put the call to base.OnModelCreating(builder) at the bottom of OnModelCreating. Moving base.OnModelCreating(builder) at the very top solved the issue (no duplicate columns and FKs).

    Thanks to this GutHub issue

提交回复
热议问题