PM> Update-Database
Specify the '-Verbose' flag to view the SQL statements being applied to the target database.
Applying explicit migrations: [201412101611313_v1].
Applying explicit migration: 201412101611313_v1.
System.Runtime.Serialization.SerializationException: Type is not resolved for member 'Npgsql.NpgsqlException,Npgsql, Version=2.2.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7'.
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
at System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMigration, Boolean force)
at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Type is not resolved for member 'Npgsql.NpgsqlException,Npgsql, Version=2.2.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7'.
<?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>
<system.data>
<DbProviderFactories>
<!--for EF4.x and EF6.0.x -->
<!--you may need this. if you don't modify machine.config-->
<remove invariant="Npgsql"/>
<add name="Npgsql - .Net Data Provider for PostgreSQL" invariant="Npgsql"
description=".Net Data Provider for PostgreSQL" support="FF"
type="Npgsql.NpgsqlFactory, Npgsql"/>
</DbProviderFactories>
</system.data>
<connectionStrings>
<!--for EF4.x and EF6.0.x -->
<add name="DefaultConnection" connectionString="Server=127.0.0.1;port=5432;Database=Test;User Id=markus;Password=beetle;" providerName="Npgsql"/>
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<entityFramework>
<!--<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb"/>
</parameters>
</defaultConnectionFactory>-->
<providers>
<!--<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />-->
<provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql.EntityFramework"/>
</providers>
</entityFramework>
</configuration>
Entity Framework
David KarlaÅ¡ added support for EFMigration and Database creation in EF6+.Â
Now it is possible to start Code First projects without needing to create a database upfront. EntityFramework and Npgsql will take care of it.
Emil Lenngren added support for a lot of missing features of EntityFramework.