2

I am getting this error, when typing enable-migrations in packagemanager.

No Entity Framework provider found for the ADO.NET provider with invariant name 'FirebirdSql.Data.FirebirdClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

This is what i done so far:

Made this DataContext class:

class DataContext : DbContext
{
    public static FbConnection connection
    {
        get
        {
            FbConnectionStringBuilder b = new FbConnectionStringBuilder();
            b.ServerType = FbServerType.Embedded;
            b.UserID = "SYSDBA";
            b.Password = "masterkey";
            b.Dialect = 3;
            b.Database = "D:\\cafw.fdb";
            b.Charset = "WIN1251";
            b.ClientLibrary = "fbembed.dll";

            return  new FbConnection(b.ToString());
        }
    }


    public DataContext()
        : base(connection, true)
    {

    }
}

Note that this is a console application, so i have no app.config file to add the provider, and the database doesn't actually exist, was hoping it created that for me :)

BjarkeCK
  • 5,694
  • 5
  • 41
  • 59
  • possible duplicate of [Entity Framework Code First - Firebird migration: No MigrationSqlGenerator?](http://stackoverflow.com/questions/17853226/entity-framework-code-first-firebird-migration-no-migrationsqlgenerator) – Mark Rotteveel Feb 13 '14 at 08:45

1 Answers1

1

The firebird ado.net drive does not support code First Migrations.

Dakianth
  • 51
  • 3
  • 1
    For more information see [Entity Framework Code First - Firebird migration: No MigrationSqlGenerator?](http://stackoverflow.com/questions/17853226/entity-framework-code-first-firebird-migration-no-migrationsqlgenerator) and [Support for EF's Migrations](http://tracker.firebirdsql.org/browse/DNET-506) – Dakianth Feb 12 '14 at 14:23
  • Well, It does for some time. – Bart Jun 13 '17 at 06:52