Entity Framework: Setting a Foreign Key Property

前端 未结 6 1487
暗喜
暗喜 2020-12-02 21:17

We have a table that looks roughly like this:

CREATE TABLE Lockers 
{
  UserID int NOT NULL PRIMARY KEY (foreign key),
  LockerStyleID int (foreign key),
  N         


        
6条回答
  •  情书的邮戳
    2020-12-02 21:47

    Following on from Dylan's answer, Alex James has written a blog on precisely this, explaining the problem in full and how to go about the partial class + property solution.

    Faking Foreign Keys - EF3.5

提交回复
热议问题