'No Entity Framework provider found for the ADO.NET provider with invariant name 'FirebirdSql.Data.FirebirdClient'
------------------------------------------------------------------------------------------------------------------
Key: DNET-947
URL: http://tracker.firebirdsql.org/browse/DNET-947
Project: .NET Data provider
Issue Type: Bug
Components: ADO.NET Provider, Entity Framework
Affects Versions: 7.5.0.0
Environment: .netcore 3.1, ef 6.4
Reporter: Muhammad Yasar
Assignee: Jiri Cincura
By initializing the MYDbMigrator get the exception about provider not found. Is migration supported by firebird any other way to register the provider. Also tried to configure with appconfig but configuration section system.data cannot be recognized.
public abstract class MYBaseEntityContext : DbContext
{
protected MYBaseEntityContext() : base(connection, true)
{
Configuration.LazyLoadingEnabled = true;
Configuration.ProxyCreationEnabled = true;
Configuration.AutoDetectChangesEnabled = true;
Configuration.ValidateOnSaveEnabled = true;
}
}
public class MYDbMigrator<TContext, TMigrationsConfiguration> : DbMigrator
where TContext : MYBaseEntityContext
where TMigrationsConfiguration : MYDataMigrationConfiguration<TContext>, new()
{
public MYDbMigrator(DbConnection connection)
: base(new TMigrationsConfiguration()
{
TargetDatabase = new DbConnectionInfo(connection.ConnectionString, "FirebirdSql.Data.FirebirdClient")
})
{ }
}
public class MYDataMigrationConfiguration<TDataContext> :
DbMigrationsConfiguration<TDataContext>
where TDataContext : MYBaseEntityContext
{
public MYDataMigrationConfiguration()
{
AutomaticMigrationsEnabled = true;
AutomaticMigrationDataLossAllowed = false;
SetHistoryContextFactory("FirebirdSql.Data.FirebirdClient", (connection, defaultSchema) => new BaseHistoryDataContext(connection, defaultSchema));
SetSqlGenerator("FirebirdSql.Data.FirebirdClient", new FbMigrationSqlGenerator());
}
}
private static FbConnection connection
{
get
{
FbConnectionStringBuilder b = new FbConnectionStringBuilder
{
ServerType = FbServerType.Embedded,
UserID = "sysdba",
Password = "masterkey",
DataSource = "localhost",
Database = "MYMigrations.fdb",
ClientLibrary = "fbclient.dll",
Dialect = 3
};
return new FbConnection(b.ToString());
}
}
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/ZqwSn.png
.net-core firebird-3.0
share edit delete flag
edited 17 mins ago
asked 28 mins ago
DronBoard
5311 silver badge99 bronze badges
'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 go.microsoft.com/fwlink/?LinkId=260882 for more information.
https://stackoverflow.com/questions/63449608/no-entity-framework-provider-found-for-the-ado-net-provider-with-invariant-name
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|