tareqimbasher / NetPad

A cross-platform C# editor and playground.
MIT License
1.12k stars 60 forks source link

Please provide option to not pluralize the database #141

Closed grosch closed 6 months ago

grosch commented 7 months ago

I'm not seeing it, sorry if it already exists. I'm looking for a way to have the --no-pluralize flag sent when you're generating the schema.

tareqimbasher commented 7 months ago

It does not currently exist. Will add it!

willsmith9182 commented 6 months ago

Further to this, is there a way to specify which schemas you actually want scaffolding?

--schema <SCHEMA_NAME> can be used for each schema you want included when calling ef scaffold.

I have a fun situation where I have tables with the same name in different schemas, and even schemas I don't want to query/scaffold.

tareqimbasher commented 6 months ago

Currently (v0.6.1) you are not provided with any control over the scaffolding process. I will provide options to configure how that works in the near future including controlling the schemas you want to scaffold.

A workaround is to scaffold your own assembly of the database using the dotnet ef command passing it all the options you need, then just build and reference the generated assembly in a NetPad script and use it. You'll need to add whatever EF NuGet packages you need to your script as well.

tareqimbasher commented 6 months ago

PR #147

Will go out with 0.7.0