No Entity Framework provider found ???

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
puvinax
Posts: 10
Joined: Mon 09 Sep 2013 15:43

No Entity Framework provider found ???

Post by puvinax » Tue 24 Sep 2013 11:41

Hi All
Can anyone configure the following sample code ?
So that it can run , When I run it the following error occurs
No Entity Framework provider found for the ADO.NET provider with invariant name 'Devart.Data.SQLite'
Setting in Machine.config

Code: Select all

<system.data>
    <DbProviderFactories>
      <add name="dotConnect for SQLite" invariant="Devart.Data.SQLite"
        description="Devart dotConnect for SQLite" type="Devart.Data.SQLite.SQLiteProviderFactory, Devart.Data.SQLite, Version=4.6.287.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
Download Sample Code :

http://www.solidfiles.com/d/cd9615e4fb/

INFO :
SQLite Code First
Entity Framework 6
VS 2013 Preview
dotConnect for SQLite 4.6.287
Last edited by puvinax on Wed 25 Sep 2013 14:45, edited 1 time in total.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: No Entity Framework provider found ???

Post by MariiaI » Wed 25 Sep 2013 13:23

You should add the Entity Framework provider registration by registering it in the entityFramework section of your application config file:

Code: Select all

<entityFramework>
    <providers>     
      <provider invariantName="Devart.Data.SQLite" type="Devart.Data.SQLite.Entity.SQLiteEntityProviderServices, Devart.Data.SQLite.Entity, Version=4.6.287.6, Culture=neutral, PublicKeyToken=09af7300eec23701" >                  
      </provider>   
    </providers> 
</entityFramework>
For more information about EF6 support and Entity Framework provider registration (the "Provider Registration" section), please refer to http://blogs.devart.com/dotconnect/enti ... force.html.

Please tell us if this helps.

puvinax
Posts: 10
Joined: Mon 09 Sep 2013 15:43

Re: No Entity Framework provider found ???

Post by puvinax » Wed 25 Sep 2013 14:54

Thank you
Now error changed (The type initializer for 'CrmDemoCodeFirst.MySQLiteContext' threw an exception.)
I was hoping you would see my code example
This sample is just a sample of your code that you put in your site
http://www.devart.com/upload/CrmDemo.EFCodeFirst.zip (of course I seprated only sqlite)

I Only Need Simple Working Example same as your above sample that when I execute it
running without problem

Image
Image

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: No Entity Framework provider found ???

Post by MariiaI » Thu 26 Sep 2013 12:22

We have investigated the sample you have sent us.
First, you should register the entityFramework section in your application config file and then you should add the Entity Framework provider registration by registering it in the entityFramework section (please refer here):

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, 
Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <entityFramework>
    <providers>
      <provider invariantName="Devart.Data.SQLite" type="Devart.Data.SQLite.Entity.SQLiteEntityProviderServices, Devart.Data.SQLite.Entity, Version=4.6.287.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      </providers>
  </entityFramework>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
</configuration>
JIC: please put the <startup> section in the end of the config file.

We are sending you a modified sample project to the e-mail address you have provided in your forum profile. Please check that the letter is not blocked by your mail filter. Please test it and notify us about the results.

puvinax
Posts: 10
Joined: Mon 09 Sep 2013 15:43

Re: No Entity Framework provider found ???

Post by puvinax » Thu 26 Sep 2013 19:12

Thank you very much for the email and code example
Yes, my problem was resolved
Thank you for the effort and support :D

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: No Entity Framework provider found ???

Post by MariiaI » Fri 27 Sep 2013 05:04

Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.

fastcote
Posts: 1
Joined: Sun 03 Nov 2013 20:35

Re: No Entity Framework provider found ???

Post by fastcote » Sun 03 Nov 2013 20:39

Is there an updated sample available that works with Entity Framework 6.0.1?

I have tried for hours and cannot get anything to work.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: No Entity Framework provider found ???

Post by MariiaI » Mon 04 Nov 2013 13:25

Support for Entity Framework 6.0.0 and 6.0.1 is available in the latest build of dotConnect for SQLite 5.1.26 - http://forums.devart.com/viewtopic.php?f=29&t=28238.
Please tell us whether you are using this version or not. If not, please upgrade your version of dotConnect for SQLite to the latest one. New build can be downloaded from http://www.devart.com/dotconnect/sqlite/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
If yes, please specify the issues you have encountered in more details, e.g. what exactly errors you are getting,etc.

gte941y
Posts: 6
Joined: Sat 16 Nov 2013 21:17

Re: No Entity Framework provider found ???

Post by gte941y » Sat 16 Nov 2013 22:03

I'm having the exact same problems as the original poster. Can you please make the updated solution available for download? I'm using dotConnect for 5.1.36.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: No Entity Framework provider found ???

Post by MariiaI » Mon 18 Nov 2013 13:01

Have you made all the necessary steps, described above and in the blog? If yes (all required sections are registered in your config file, all required assemblies are added) and you still encounter this error, please send us a sample project, so that we are able to investigate it in more details and find a solution for you.

We will update samples for Entity Framework 6 and inform you when it is available for download.

Pauli
Posts: 10
Joined: Thu 11 Oct 2012 14:21
Location: Finland

Re: No Entity Framework provider found ???

Post by Pauli » Mon 18 Nov 2013 14:21

I have spent a couple hours trying to get my project working on EF 6. It is very frustrating. You should provide updated sample projects for latest EF versions? It would make clients life easier.
Last edited by Pauli on Tue 19 Nov 2013 04:27, edited 1 time in total.

gte941y
Posts: 6
Joined: Sat 16 Nov 2013 21:17

Re: No Entity Framework provider found ???

Post by gte941y » Mon 18 Nov 2013 20:08

I had worked through that blog previously trying to get the config based registration working. I just went back through and tried the code based registration and was able to get everything working without issue. I'm sure it was user error previously and I plan to use the code based approach in practice anyways so I think I'm through this hurdle (at least I have a working example).

Thanks for the help.

Pauli
Posts: 10
Joined: Thu 11 Oct 2012 14:21
Location: Finland

Re: No Entity Framework provider found ???

Post by Pauli » Tue 19 Nov 2013 04:52

I found the solution to my problem.
First problem was that the Entity framework version in my edml file's Model settings was wrong. I did not remember that I had to change it.

Second problem I found by accident. I was using Visual studio 2013 when I got error message "Unable to load specified metadata resource". After while I double clicked the solution file and it was opened with VS 2012. After compiling it everything worked. So the same solution with the same projects works with VS 2012 but not with VS 2013. It would be nice to know what is the difference.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: No Entity Framework provider found ???

Post by MariiaI » Tue 19 Nov 2013 08:48

We will update the samples as soon as possible and will investigate the behavior related to Visual Studio 2013. We will inform you about the results as soon any are available.

Post Reply