Page 1 of 1

No Entity Framework provider found ???

Posted: Tue 24 Sep 2013 11:41
by puvinax
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

Re: No Entity Framework provider found ???

Posted: Wed 25 Sep 2013 13:23
by MariiaI
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.

Re: No Entity Framework provider found ???

Posted: Wed 25 Sep 2013 14:54
by puvinax
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

Re: No Entity Framework provider found ???

Posted: Thu 26 Sep 2013 12:22
by MariiaI
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.

Re: No Entity Framework provider found ???

Posted: Thu 26 Sep 2013 19:12
by puvinax
Thank you very much for the email and code example
Yes, my problem was resolved
Thank you for the effort and support :D

Re: No Entity Framework provider found ???

Posted: Fri 27 Sep 2013 05:04
by MariiaI
Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.

Re: No Entity Framework provider found ???

Posted: Sun 03 Nov 2013 20:39
by fastcote
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.

Re: No Entity Framework provider found ???

Posted: Mon 04 Nov 2013 13:25
by MariiaI
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.

Re: No Entity Framework provider found ???

Posted: Sat 16 Nov 2013 22:03
by gte941y
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.

Re: No Entity Framework provider found ???

Posted: Mon 18 Nov 2013 13:01
by MariiaI
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.

Re: No Entity Framework provider found ???

Posted: Mon 18 Nov 2013 14:21
by Pauli
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.

Re: No Entity Framework provider found ???

Posted: Mon 18 Nov 2013 20:08
by gte941y
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.

Re: No Entity Framework provider found ???

Posted: Tue 19 Nov 2013 04:52
by Pauli
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.

Re: No Entity Framework provider found ???

Posted: Tue 19 Nov 2013 08:48
by MariiaI
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.