ErikEJ / EFCorePowerTools

Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI
MIT License
2.18k stars 298 forks source link

Pluralization no longer works #843

Closed ghisbo closed 3 years ago

ghisbo commented 3 years ago

in the Context , the DBSet created automatrically a plural form : example: Copies for records of "Copy"

This no longer works

Steps to reproduce

Table Copy; Reverse Engineer and create Context.

EFCorePowerTools Version Info: Version 2.5.537.0

SQLite ADO.NET Provider included: 1.0.109.0 SQLite EF6 DbProvider in GAC - No

System.Data.SQLite DDEX provider - No SQLite Simple DDEX provider - Yes

Database engine: ( Postgres )

Visual Studio version: Visual Studio 2019 16.8.5

ErikEJ commented 3 years ago

Please share your efpt.config.json file

ghisbo commented 3 years ago

{ "CodeGenerationMode": 1, "ContextClassName": "BaionsDbContext", "ContextNamespace": null, "DefaultDacpacSchema": null, "FilterSchemas": false, "IncludeConnectionString": true, "ModelNamespace": null, "OutputContextPath": "Context", "OutputPath": "Models", "ProjectRootNamespace": "BaLoadAdressCompany", "Schemas": null, "SelectedHandlebarsLanguage": 0, "SelectedToBeGenerated": 0, "Tables": [ { "Name": "baionsdb.JuridicalForm", "ObjectType": 0 }, { "Name": "baionsdb.Economic", "ObjectType": 0 }, { "Name": "baionsdb.Company", "ObjectType": 0 }, { "Name": "baionsdb.Country", "ObjectType": 0 }, { "Name": "baionsdb.Region", "ObjectType": 0 }, { "Name": "baionsdb.Log", "ObjectType": 0 }, { "Name": "baionsdb.AppActivity", "ObjectType": 0 }, { "Name": "baionsdb.BrowserOrApp", "ObjectType": 0 }, { "Name": "baionsdb.FeedbackSetup", "ObjectType": 0 }, { "Name": "baionsdb.TopicList", "ObjectType": 0 }, { "Name": "baionsdb.Address", "ObjectType": 0 }, { "Name": "baionsdb.SearchString", "ObjectType": 0 }, { "Name": "baionsdb.JuridicalStatus", "ObjectType": 0 }, { "Name": "baionsdb.TopicListName", "ObjectType": 0 }, { "Name": "baionsdb.AdSiteList", "ObjectType": 0 }, { "Name": "baionsdb.UserAction", "ObjectType": 0 }, { "Name": "baionsdb.CompanyAdSiteList", "ObjectType": 0 }, { "Name": "baionsdb.Validation", "ObjectType": 0 }, { "Name": "baionsdb.Config", "ObjectType": 0 }, { "Name": "baionsdb.SearchType", "ObjectType": 0 }, { "Name": "baionsdb.Url", "ObjectType": 0 }, { "Name": "baionsdb.Topic", "ObjectType": 0 }, { "Name": "baionsdb.GoogleReply", "ObjectType": 0 }, { "Name": "baionsdb.Language", "ObjectType": 0 }, { "Name": "baionsdb.Province", "ObjectType": 0 }, { "Name": "internal.KboEntityEnterprise", "ObjectType": 0 }, { "Name": "internal.KboActivity", "ObjectType": 0 }, { "Name": "internal.KboName", "ObjectType": 0 }, { "Name": "internal.Script", "ObjectType": 0 }, { "Name": "internal.Code", "ObjectType": 0 }, { "Name": "internal.Xbrl", "ObjectType": 0 }, { "Name": "internal.KboEnterprise", "ObjectType": 0 }, { "Name": "internal.KboAddress", "ObjectType": 0 }, { "Name": "internal.KboContact", "ObjectType": 0 }, { "Name": "internal.Internalinfo", "ObjectType": 0 }, { "Name": "internal.KboNameX", "ObjectType": 0 }, { "Name": "internal.InternalItem", "ObjectType": 0 }, { "Name": "internal.TempUrl", "ObjectType": 0 }, { "Name": "internal.TempUrlCopy", "ObjectType": 0 }, { "Name": "internal.KboContactX", "ObjectType": 0 }, { "Name": "internal.InternalType", "ObjectType": 0 }, { "Name": "internal.KboCode", "ObjectType": 0 } ], "UiHint": "zammad", "UseBoolPropertiesWithoutDefaultSql": false, "UseDatabaseNames": true, "UseDbContextSplitting": false, "UseFluentApiOnly": true, "UseHandleBars": false, "UseInflector": true, "UseLegacyPluralizer": false, "UseNoConstructor": false, "UseNoNavigations": false, "UseNodaTime": false, "UseNullableReferences": false, "UseSpatial": false }

ErikEJ commented 3 years ago

Is your table named Copy?

I do not see that on the list of tables...

ghisbo commented 3 years ago

No, that was just an example Any table will do: ex the last one KboCode should become KboCodes

ErikEJ commented 3 years ago

I am unable to reproduce...

ghisbo commented 3 years ago

I tried with NetCore 3.1 and 5 both the same. i do not understand why pluralization is gone?

ErikEJ commented 3 years ago

It is not gone, you are the only user reporting this.

Do you have renaming enabled?

ghisbo commented 3 years ago

Where should i enable this? image

ErikEJ commented 3 years ago

Ah! Uncheck "Use table and column names directly from the database" - sorry I missed that earlier.

ghisbo commented 3 years ago

That does it !! Thanks for your help