Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.InvalidCastException: Object cannot be cast from DBNull to other types. [DNET913] #840

Open
firebird-automations opened this issue Nov 4, 2019 · 1 comment

Comments

@firebird-automations
Copy link

Submitted by: @cincuranet

Attachments:
EFDataAccess.zip
REPORTTEST.FDB

Votes: 2

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

at FirebirdSql.Data.FirebirdClient.FbDataReader.<GetInt32>b__51_0(Int32 x)

at FirebirdSql.Data.FirebirdClient.FbDataReader.CheckedGetValue[T](Func`2 f, Int32 index)

at FirebirdSql.Data.FirebirdClient.FbDataReader.GetInt32(Int32 i)

at lambda_method(Closure , DbDataReader )

at Microsoft.EntityFrameworkCore.Storage.Internal.NoopExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)

at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()

at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider._TrackEntities[TOut,TIn](IEnumerable`1 results, QueryContext queryContext, IList`1 entityTrackingInfos, IList`1 entityAccessors)+MoveNext()

at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Attachment: EFDataAccess.zip [ 13396 ]

Attachment: REPORTTEST.FDB [ 13397 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants