I tried it again with the 1.0.95 NuGet packages (even with a new project),
and I get the exact same error.  You said EF looks like it is trying to use
SQL Server.  I noticed in the configuration of App.config after the packages
are installed, the defaultConnectionFactory refers to
System.Data.Entity.Infrastructure.SqlConnectionFactory, and there is a
provider System.Data.Entity.SqlServer.SqlProviderServices in addition to the
SQLite provider.  I am not experienced in this area.  Does the default
connection factory perhaps need to change?




<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection,
EntityFramework, Version=6.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <!-- For more information on Entity Framework configuration, visit
http://go.microsoft.com/fwlink/?LinkID=237468 -->
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
  </startup>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SQLite" />
      <add name="SQLite Data Provider" invariant="System.Data.SQLite"
description=".NET Framework Data Provider for SQLite"
type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
      <remove invariant="System.Data.SQLite.EF6" />
      <add name="SQLite Data Provider (Entity Framework 6)"
invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider
for SQLite (Entity Framework 6)"
type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"
/>
    </DbProviderFactories>
  </system.data>
  <entityFramework>
    <defaultConnectionFactory
type="System.Data.Entity.Infrastructure.SqlConnectionFactory,
EntityFramework" />
    <providers>
      <provider invariantName="System.Data.SQLite.EF6"
type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"
/>
      <provider invariantName="System.Data.SqlClient"
type="System.Data.Entity.SqlServer.SqlProviderServices,
EntityFramework.SqlServer" />
    </providers>
  </entityFramework>
</configuration>

====================================================
Walter Williams
Senior Software Engineer
Sawtooth Software, Inc.

----------------------------------------------------
"Do, or do not.  There is no try."


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Joe Mistachkin
Sent: Wednesday, February 04, 2015 9:22 PM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Repost: Having problems with Entity Framework code
first db creation


Walter Williams wrote:
>
> I received the same result.
>

Is that the same error message you posted before (i.e. "Unable to complete
operation. The supplied SqlConnection does not specify an initial catalog or
AttachDBFileName.")?  That particular error message leads me to believe that
the Entity Framework is trying to use the ADO.NET provider for SQL Server
instead of SQLite.

Also, could you try updating to the latest NuGet packages as well?  They
have not been pushed and are only [now] available for download from the
site.

--
Joe Mistachkin

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to