Friday, October 25, 2013

Include Foreign Key Columns In The Model Disabled (ADO.NET Entity Framework)

When adding database objects to your entity data model, The checkbox option labeled (Include foreign key columns in the model) might be disabled.

I later found out that the class library's target framework was .NET 3.5 Framework. While the solution and asp.net website's
target framework is .NET 4.0.

The solution was to change the target framework to .NET 4.0 then recompiled the class library. Alas! the include foreign key columns is now enabled.

Cheers!

0 comments:

Post a Comment