8.0.0-alpha-3 System.InvalidCastException: Object cannot be cast from DBNull to 
other types.
--------------------------------------------------------------------------------------------

                 Key: DNET-1019
                 URL: http://tracker.firebirdsql.org/browse/DNET-1019
             Project: .NET Data provider
          Issue Type: Bug
          Components: Entity Framework Core
    Affects Versions: 8.0.0.0
         Environment: Windows 10 VS 2019 v16.8 Framework v4.8
            Reporter: Lynn Bennett
            Assignee: Jiri Cincura


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



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

        


_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to