NullReferenceException when doing InsertOnSubmit in LINQ to SQL

后端 未结 2 1983
旧巷少年郎
旧巷少年郎 2021-02-03 23:09

In my database I have a table called StaffMembers

when I bring this into my .net Project as through linq-to-sql an entity class StaffMember is created

Now I have

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-03 23:41

    Sometime, just forgot to add this line to the base class:

    [InheritanceMapping(Code = "Class", Type = typeof(Class))]

提交回复
热议问题