EntityFramework 4.3.1 - MissingMethodException - Sql Compact

edited April 2012
I have my POCO model is seperate dll than my asp.net mvc 3 website.

I created new connection in LinqPad Beta: v4.41.01 selected option for Poco, provided path to custom dll, Chose DbContext, Chose via parameterless constructor.

This did not work, as I am using SqlServer Compact.

Then I created 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>

With this, Test on connection is shown successful. Even, tree on left is also populated. But when I run any query, it throws exception as follows:
Method not found: 'System.Data.Entity.DbSet`1 InventoryModelContext.get_xxx()'.

Any solution or workaround?

Thanks in advance.

Comments

  • Also, note that this seems to be compilation error!
  • I got the exception. I am not able to use my dbContext with LinqPAD.


    Note: But I exposed DBcontext via Odata. Used this Odata with LinqPAD and it works fine.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!