开发者

ASP.NET MVC2 and Entity Framework 4 Generating Model from Database without duplicating Membership Models

开发者 https://www.devze.com 2023-01-25 11:13 出处:网络
I have an MVC 2 project where I recently consolidated the auto-generated membership/roles database with my primary database. I have an EF4 model generated from the primary database and it contains a t

I have an MVC 2 project where I recently consolidated the auto-generated membership/roles database with my primary database. I have an EF4 model generated from the primary database and it contains a table called Books. Now that I've consolidated the two, I setup relationships between Books and aspnet_Users so that I can see each user's books.

开发者_高级运维

The problem is that I want to update my EF4 model so that it represents this relationship, but I want to keep all of the generated membership code.

Is there anyway to do this?


The solution is to not map the membership tables. Store the GUID or email address in another table. See the question comments for the detailed answer. Thanks @RPM1984 and @Craig Stuntz.

0

精彩评论

暂无评论...
验证码 换一张
取 消