Closed joarb closed 4 years ago
I am very busy with some things of the company, active in the project only in early 2020, so I recommend using the following provider: https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient
Hello, Joar, I had the same problem, but I could fix it tonight. The problem is the driver of the FirebirdSql version 6.0.6 or higher. Until version 6.0.5 the function UseFirebird() is in the namespace using FirebirdSql.EntityFrameworkCore.Firebird.Extensions; As of version 6.0.6, the function is available in using Microsoft.EntityFrameworkCore;
Go back to version 6.0.5 and the bug is no longer there. I had the following error message:
Translated with www.DeepL.com/Translator (free version)
2019-11-29 01:12:37.8027|ERROR|Microsoft.EntityFrameworkCore.Query|An exception occurred in the database while iterating the results of a query for context type 'WS.Data.BL.EFC.Fb25.Fb25SwebBroker01.Models.Fb25SwebBroker01Db'.
System.NullReferenceException: Object reference not set to an instance of an object.
at EntityFrameworkCore.FirebirdSql.Query.Sql.Internal.FbQuerySqlGenerator..ctor(QuerySqlGeneratorDependencies dependencies, SelectExpression selectExpression, IFbOptions fBOptions)
at EntityFrameworkCore.FirebirdSql.Query.Sql.Internal.FbQuerySqlGeneratorFactory.CreateDefault(SelectExpression selectExpression)
at Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression.CreateDefaultQuerySqlGenerator()
at Microsoft.EntityFrameworkCore.Query.Internal.ShaperCommandContext.2 valueFactory) at Microsoft.EntityFrameworkCore.Query.Internal.ShaperCommandContext.NotifyReaderCreated(DbDataReader dataReader) at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable
1.AsyncEnumerator.BufferlessMoveNext(DbContext , Boolean buffer, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable1.AsyncEnumerator.MoveNext(CancellationToken cancellationToken) at System.Linq.AsyncEnumerable.FirstOrDefault_[TSource](IAsyncEnumerable
1 source, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.TaskResultAsyncEnumerable1.Enumerator.MoveNext(CancellationToken cancellationToken) at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator
2.MoveNextCore(CancellationToken cancellationToken)
at System.Linq.AsyncEnumerable.AsyncIterator1.MoveNext(CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.ExceptionInterceptor
1.EnumeratorExceptionInterceptor.MoveNext(CancellationToken cancellationToken)
After downgrading to version 6.0.5 the data was retrieved properly from the database.
Many greetings
Winfried
Thanks for the input @ralmsdeveloper and @WiSch4711 . I wasn't able to log in using the 6.5.0-version either (I suppose 6.0.5 was a typo?), so I'll head over to https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient and ask there instead.
Sorry, FirebirdSql.EntityFrameworkCore.Firebird Version 6.5.0 is correct.
Winfried
Am 01.12.2019 um 10:30 schrieb Joar Bølstad:
Thanks for the input @ralmsdeveloper https://github.com/ralmsdeveloper and @WiSch4711 https://github.com/WiSch4711 . I wasn't able to log in using the 6.5.0-version either (I suppose 6.0.5 was a typo?), so I'll head over to https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient and ask there instead.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ralmsdeveloper/EntityFrameworkCore.FirebirdSQL/issues/53?email_source=notifications&email_token=AFK2RTYGDFX7VLJO4C4KAPLQWN7Z3A5CNFSM4JSTSNR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFRCZDA#issuecomment-560082060, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFK2RT7DAG6BEEHTZ5WXALLQWN7Z3ANCNFSM4JSTSNRQ.
-- Mit freundlichem Gruß aus Siegburg
Winfried Schneller winfried@schneller.de +49 2241 604051
The issue
I'm trying to connect to a database from EFCore.
Steps to reproduce
where
I've verified connecting to the same database using
isql
:which should be sufficient verification.
Error details
If you are seeing an exception, include the full exceptions details (message and stack trace).
There is nothing related to this error in the
firebird.log
file.Further technical details
Firebird version: 3.0.4. EntityFrameworkCore.FirebirdSql version: 7.1.1.
Other details about my project setup: None