Question

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 :)

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top