8
The most recent error im getting is
ERROR: 42P01: relation "dbo.__MigrationHistory" does not exist
but im convinced that this is just because something earlier hasnt been set up properly.
Im currently trying to set up entity framework 4.4 code first to use Npgsql 2.0.12, I have done the following and it seems to atleast be connecting to the database now but giving me the above error when I do context.saveChanges();
Updated the machine.config for .net 2.0.50727 with;
< add name="Npgsql Data Provider" invariant="Npgsql" support="FF" description=".Net Framework Data Provider for Postgresql Server" type="Npgsql.NpgsqlFactory, Npgsql, Version=2.0.12.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
Added the dlls to the project
Changed the app.config to look like this;
<configuration> <configSections> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </configSections> <system.data> <DbProviderFactories> <remove invariant="Npgsql"></remove> <add name="Npgsql Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for Postgresql Server" type="Npgsql.NpgsqlFactory, Npgsql, Version=2.0.12.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" /> </DbProviderFactories> </system.data> <connectionStrings> <add name="DataContext" connectionString="Server=127.0.0.1;Port=5432;Database=postgres;User Id=postgres;Password=*******;CommandTimeout=20;" providerName="Npgsql" /> </connectionStrings> </configuration>