Trying to use entity framework scaffolding with firebird database 3.0, and i get error

40 views
Skip to first unread message

Mindaugas

unread,
Aug 10, 2024, 1:19:40 PM8/10/24
to firebird-net-provider
Hello,

I get this error when i try to use entity framework scaffold.

command:
dotnet ef dbcontext scaffold "User=SYSDBA;Password=***;Database=\tt\tt\tt\tt.fdb;DataSource=localhost;Port=3050;Dialect=3;Charset=UTF8;Role=;Connection lifetime=15;Pooling=true;MinPoolSize=0;MaxPoolSize=50;Packet Size=8192;ServerType=0;" FirebirdSql.EntityFrameworkCore.Firebird --output-dir Models --context TTDbContext --context-dir DataContext --force

this command hangs for some time and results with error:
System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
   at FirebirdSql.EntityFrameworkCore.Firebird.Scaffolding.Internal.FbDatabaseModelFactory.GetIndexes(DbConnection connection, IReadOnlyList`1 tables, Func`2 tableFilter)
   at FirebirdSql.EntityFrameworkCore.Firebird.Scaffolding.Internal.FbDatabaseModelFactory.GetTables(DbConnection connection, Func`2 filter)
   at FirebirdSql.EntityFrameworkCore.Firebird.Scaffolding.Internal.FbDatabaseModelFactory.Create(DbConnection connection, DatabaseModelFactoryOptions options)
   at FirebirdSql.EntityFrameworkCore.Firebird.Scaffolding.Internal.FbDatabaseModelFactory.Create(String connectionString, DatabaseModelFactoryOptions options)
   at Microsoft.EntityFrameworkCore.Scaffolding.Internal.ReverseEngineerScaffolder.ScaffoldModel(String connectionString, DatabaseModelFactoryOptions databaseOptions, ModelReverseEngineerOptions modelOptions, ModelCodeGenerationOptions codeOptions)
   at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldContext(String provider, String connectionString, String outputDir, String outputContextDir, String dbContextClassName, IEnumerable`1 schemas, IEnumerable`1 tables, String modelNamespace, String contextNamespace, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames, Boolean suppressOnConfiguring, Boolean noPluralize)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContextImpl(String provider, String connectionString, String outputDir, String outputDbContextDir, String dbContextClassName, IEnumerable`1 schemaFilters, IEnumerable`1 tableFilters, String modelNamespace, String contextNamespace, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames, Boolean suppressOnConfiguring, Boolean noPluralize)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContext.<>c__DisplayClass0_0.<.ctor>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Sequence contains no matching element


Maybe you could help me solve this issue or point me to some debugging directions?

Daniel Rail

unread,
Mar 5, 2026, 2:05:34 PMMar 5
to firebird-net-provider
Hi,

I'm also encountering this error.  I'm using .Net 10, Firebird's EF Core version 13 and Firebird 4. 

Any help would be appreciated.

Daniel

Jiří Činčura

unread,
Mar 6, 2026, 7:54:16 AMMar 6
to 'Mr. John' via firebird-net-provider

Daniel Rail

unread,
Mar 6, 2026, 8:56:02 AMMar 6
to firebird-n...@googlegroups.com
Jiri,

Thank you for the information.

Do you have an estimate when the fix will be available?

Daniel Rail

From: firebird-n...@googlegroups.com <firebird-n...@googlegroups.com> on behalf of Jiří Činčura <ji...@cincura.net>
Sent: Friday, March 6, 2026 8:54 AM
To: 'Mr. John' via firebird-net-provider <firebird-n...@googlegroups.com>
Subject: Re: [firebird-net-provider] Re: Trying to use entity framework scaffolding with firebird database 3.0, and i get error
 
--
Support the ongoing development of Firebird! Consider donating to the
Firebird Foundation and help ensure its future. Every contribution makes
a difference. Learn more and donate here:
https://www.firebirdsql.org/donate.
---
You received this message because you are subscribed to the Google Groups "firebird-net-provider" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-net-pro...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/firebird-net-provider/6cd67ff9-5afb-48b2-8401-39e065e32709%40app.fastmail.com.

Jiří Činčura

unread,
Mar 6, 2026, 11:55:27 AMMar 6
to 'Mr. John' via firebird-net-provider
There's a PR for it. But changes are requested. I guess you can take over.

--
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

On Fri, Mar 6, 2026, at 14:55, Daniel Rail wrote:
> Jiri,
>
> Thank you for the information.
>
> Do you have an estimate when the fix will be available?
>
> Daniel Rail
> *From:* firebird-n...@googlegroups.com
> <firebird-n...@googlegroups.com> on behalf of Jiří Činčura
> <ji...@cincura.net>
> *Sent:* Friday, March 6, 2026 8:54 AM
> *To:* 'Mr. John' via firebird-net-provider
> <firebird-n...@googlegroups.com>
> *Subject:* Re: [firebird-net-provider] Re: Trying to use entity
> https://groups.google.com/d/msgid/firebird-net-provider/MN0PR20MB4814945E8AAE47456D2405E4F67AA%40MN0PR20MB4814.namprd20.prod.outlook.com
> <https://groups.google.com/d/msgid/firebird-net-provider/MN0PR20MB4814945E8AAE47456D2405E4F67AA%40MN0PR20MB4814.namprd20.prod.outlook.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages