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

EF Core scaffolding support [DNET798] #735

Closed
firebird-issue-importer opened this issue Dec 1, 2017 · 14 comments
Closed

EF Core scaffolding support [DNET798] #735

firebird-issue-importer opened this issue Dec 1, 2017 · 14 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Dec 1, 2017

Submitted by: @cincuranet

Jira_subtask_inward DNET663
Is duplicated by DNET886

Votes: 3

Commits: 88da531

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 24, 2018

Modified by: @cincuranet

Fix Version: 6.post [ 10857 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 8, 2019

Commented by: Henning Hassmann (henning)

Is there anything new on Scaffold? I can start it, but no database classes are created.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 9, 2019

Commented by: @cincuranet

Nothing new.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 9, 2019

Modified by: @cincuranet

Link: This issue is duplicated by DNET886 [ DNET886 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 23, 2019

Commented by: Vince (ramdevteam)

Hello,

I have the same pb.
VS2019 Pro + new http://ASP.NET Core 2.2 project.
In Nuget : installation of FirebirdSql.EntityFrameworkCode.Firebird 6.6.0 (install Firebirdsql.Data.FirebirdClient.6.6.0 + FirebirdSql.EntityFrameworkCode.Firebird.6.6.0)

Before trying with my customer database , I have create a database with one table for testing.

CREATE TABLE TESTITEM ( IDTABLE INTEGER NOT NULL, LIB VARCHAR(255));
ALTER TABLE TESTITEM ADD CONSTRAINT PK_TESTITEM PRIMARY KEY (IDTABLE);

Scaffold-dbcontext "User=SYSDBA;Password=masterkey;Database=D:\Projects\WebAppt\data\testcore.7data;DataSource=127.0.0.1;Port=3050;Dialect=3;Charset=NONE;Role=;Connection lifetime=15;Pooling=true;MinPoolSize=0;MaxPoolSize=50;PacketSize=8192;ServerType=0;" FirebirdSql.EntityFrameworkCore.Firebird -Output "D:\Projects\WebApp\testApp\Models\TestCore2" -Context "TestCore2"

No database class are created. Juste a folder with TestCore2.cs with DbContext, override void OnConfiguring and override void OnModelCreating

I missed something ?

Thanks

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 23, 2019

Commented by: @cincuranet

You missed the ticket being still active...

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 24, 2019

Modified by: @cincuranet

Fix Version: 6.planned [ 10857 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 15, 2020

Commented by: Dejan Radic (dejan)

This work for me

Install-package EntityFrameworkCore.FirebirdSql -Version 2.1.2.2
Install-package Microsoft.EntityFrameworkCore.Tools -Version 2.2.6

Scaffold-DbContext "Server=myserver;Database=mydatabase;user id=SYSDBA;password=masterkey;" EntityFrameworkCore.FirebirdSql -Force -OutputDir Models

and then downgrade to
Install-package EntityFrameworkCore.FirebirdSql -Version 2.1.1

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 10, 2021

Commented by: Giacomo Policicchio (pgiacomo)

Since i badly needed to scaffold an existing (big) db, I've made a branch with working Scaffolding.
There is a PR on Jiri's repository, but I understand if it doesn't reach contributions quality.
However, in these days I've updated it so it can be used with Microsoft.EntityFrameworkCore 5.0.1, when targeting net 5, but mantaining full compatibility with netstandard2.0 and Microsoft.EntityFrameworkCore 3.1.10

@jiri, I don't now if my work can be useful, because with this modification I needed to update several files, I know that the PR is cluttered with too many commits, if necessary I can cancel it and push a new branch with all modifications in one commit.

thanks

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 11, 2021

Commented by: @cincuranet

I know about the PR (at least for 3.1) and I'm planning to merge it. The .NET 5 etc. changes are something that should be kept apart. At the moment I'm not sure how I'm going (if ever) to handle supporting EF Core 3.1 (because of LTS) and 5.0 that's latest. But that's something to think about when I have time and discuss it in the list.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 11, 2021

Commented by: Giacomo Policicchio (pgiacomo)

EF Core in current master is targeted to run in Net 5.0, but compiled against netstandard2.0 API. I had errors running scaffolding when using EF Core with net 5.0, like methods not found, etc. So I recompiled using 5.0 APIs putting conditional defines in right places, remains one method related to annotations for wich there is no substitute, and for now I had no time to investigate it. So, for now the EF does not sense when a key shoud be made autoincremental. I'll see.
I look forward to discuss it more when you want, Bye

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 20, 2021

Commented by: Marko P (projo94)

After running this command:
Scaffold-DbContext "User=xxxx;Password=xxxx;Database=xxxx;DataSource=xxxxxx;Port=3050;Dialect=3;Charset=NONE;Role=;Connection lifetime=15;Pooling=true;MinPoolSize=0;MaxPoolSize=50;Packet Size=8192;ServerType=0;" FirebirdSql.EntityFrameworkCore.Firebird -OutputDir Models

I am getting this error:
Method not found: 'Void Microsoft.EntityFrameworkCore.Storage.DecimalTypeMapping..ctor(System.String, System.Nullable`1<System.Data.DbType>)'.

Version of FirebirdSql.EntityFrameworkCore.Firebird is 7.10.1... Also tried with version 7.10.0, and getting the same error.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 27, 2021

Modified by: @cincuranet

Fix Version: vNext [ 10970 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 29, 2021

Modified by: @cincuranet

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

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

Successfully merging a pull request may close this issue.

None yet
2 participants