How to work with navigation properties (/foreign keys) in ASP.NET MVC 3 and EF 4.1 code first

后端 未结 2 1590
你的背包
你的背包 2021-01-25 06:49

I started testing a \"workflow\" with EF code first.
First, I created class diagram. Designed few classes - you can see class diagram here
Then I used EF Code First, cre

2条回答
  •  攒了一身酷
    2021-01-25 07:23

    I believe you'll need a ProjectManager class, and your Project entity will need to have a property that points to the ProjectManager class.

    Something like:

    public class Project
    {
       public string Description {get; set;}
       public Member ProjectManager {get; set;}
    }
    

提交回复
热议问题