相关疑难解决方法(0)

实体框架代码优先 - 定义此EntityType的密钥

嗨,我打算在我的一个项目中测试EF Code First.这就是我想要的.我有三张桌子,结构如下

public partial class App_user
    {
        public int id { get; set; }
        public string name { get; set; }
        public string email_address { get; set; }
        public string password { get; set; }
        public int user_type { get; set; }
        public List<Role> Roles { get; set; }
    }

public partial class Role
    {
        public int id { get; set; }
        public string name { get; set; }
    }
public partial class User_role
    {
        public int user_id { …
Run Code Online (Sandbox Code Playgroud)

c# entity-framework ef-code-first entity-framework-4.1

26
推荐指数
2
解决办法
7万
查看次数