Entity Framework Code First - Cannot insert duplicate key in object 'db'

前端 未结 4 885
感动是毒
感动是毒 2021-01-25 17:00

I\'m using the new EF code first to one project of mine, and i\'m getting a weird error, my mode is:

abstract class Member
{
   public virtual int MemberId;
  ..         


        
4条回答
  •  天涯浪人
    2021-01-25 17:24

    I just tested it and tables of derived types in TPC (table per concrete type) inheritance don't have PK defined as identity in EF 4.1 RC.

提交回复
热议问题