You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.InvalidCastException: Object cannot be cast from DBNull to other types.
at System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ToInt32(Object value, IFormatProvider provider)
at FirebirdSql.Data.Common.DbValue.GetInt32(AsyncWrappingCommonArgs async)
at FirebirdSql.Data.FirebirdClient.FbDataReader.GetInt32(Int32 i)
at FirebirdSql.EntityFrameworkCore.Firebird.Scaffolding.Internal.FbDatabaseModelFactory.GetTables(DbConnection connection, Func`3 filter)
I'm unable to reproduce on 3.0.7. Considering 2.5 (let alone 2.5.3) is useless, because it is going to fail sooner or later on i.e. RDB$IDENTITY_TYPE column.
Submitted by: Lynn Bennett (rlbennet)
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="8.0.0-alpha3" />
<PackageReference Include="FirebirdSql.EntityFrameworkCore.Firebird" Version="8.0.0-alpha3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.3" />
Scaffold-DbContext -Provider FirebirdSql.EntityFrameworkCore.Firebird -Connection "localhost..." -Tables CT_RELAYS_VIEW
-DataAnnotations -UseDatabaseNames
System.InvalidCastException: Object cannot be cast from DBNull to other types.
at System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ToInt32(Object value, IFormatProvider provider)
at FirebirdSql.Data.Common.DbValue.GetInt32(AsyncWrappingCommonArgs async)
at FirebirdSql.Data.FirebirdClient.FbDataReader.GetInt32(Int32 i)
at FirebirdSql.EntityFrameworkCore.Firebird.Scaffolding.Internal.FbDatabaseModelFactory.GetTables(DbConnection connection, Func`3 filter)
Firebird 2.5.3 (Windows Build)
CREATE TABLE CT_RELAYS_VIEW
(
RELAY_TAG integer,
ELEMENT_DESIGNATION char(21),
ELEMENT_CODE char(4),
DS_ZONE_NUMBER char(2),
CT_TYPE char(2),
CT_NAME char(11)
);
The text was updated successfully, but these errors were encountered: