I have my POCO model - a separate dll than my asp.net mvc 3 website.
I created a new connection in the LinqPad beta: v4.41.01 the selected option for Poco, provided the path to the custom dll, Chose DbContext, Choice through the constructor without parameters.
This did not work as I am using SqlServer Compact.
Then I created the dummy.config file as follows:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework">
<parameters>
<parameter value="System.Data.SqlServerCe.4.0" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
<connectionStrings>
<add name="ModelContext"
connectionString="data source=database.sdf"
providerName="system.data.sqlserverce.4.0" />
</connectionStrings>
</configuration>
In this connection test is shown successfully. Even the tree on the left is also populated. But when I run any request, it throws an exception as follows: Method not found: 'System.Data.Entity.DbSet`1 InventoryModelContext.get_xxx ()'.
EDIT . Also note that this seems to be a compilation error!
Any solution or workaround? Am I missing something?
.