dotnetcore / dotnetcore/EntityFrameworkCore.GaussDB
ef core db first 生成 entity 失败
- Lingua principale
- C#
- Stelle
- 45
- Fork
- 6
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
# command
> dotnet ef dbcontext scaffold -f --use-database-names --schema xxx -o ./DbFirst "Host=x.x.x.x;Port=5432;Database=postgres;Username=gaussdb;Password=****;" DotNetCore.EntityFrameworkCore.GaussDB
```
dotnet ef dbcontext scaffold -f --use-database-names --schema xxx -o ./DbFirst "Host=x.x.x.x;Port=5432;Database=postgres;Username=gaussdb;Password=****;" DotNetCore.EntityFrameworkCore.GaussDB
Build started...
Build succeeded.
To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263.
System.Resources.MissingManifestResourceException: Could not find the resource "GaussDB.EntityFrameworkCore.PostgreSQL.Properties.GaussDBStrings.resources" among the resources "DotNetCore.EntityFrameworkCore.GaussDB.Properties.GaussDBStrings.resources", "DotNetCore.EntityFrameworkCore.GaussDB.Strings.resources" embedded in the assembly "DotNetCore.EntityFrameworkCore.GaussDB", nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with an incorrect name.
at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at GaussDB.EntityFrameworkCore.PostgreSQL.Internal.GaussDBResources.<>c.b__4_0(IDiagnosticsLogger logger)
at Microsoft.EntityFrameworkCore.Internal.NonCapturingLazyInitializer.EnsureInitialized[TParam,TValue](TValue& target, TParam param, Func`2 valueFactory)
at GaussDB.EntityFrameworkCore.PostgreSQL.Internal.GaussDBResources.LogFoundColumn(IDiagnosticsLogger logger)
at GaussDB.EntityFrameworkCore.PostgreSQL.Internal.GaussDBLoggerExtensions.ColumnFound(IDiagnosticsLogger`1 diagnostics, String tableName, String columnName, String dataTypeName, Boolean nullable, Boolean identity, String defaultValue, String computedValue)
at GaussDB.EntityFrameworkCore.PostgreSQL.Scaffolding.Internal.GaussDBDatabaseModelFactory.GetColumns(GaussDBConnection connection, IReadOnlyList`1 tables, String tableFilter, String internalSchemas, HashSet`1 enums, IDiagnosticsLogger`1 logger)
at GaussDB.EntityFrameworkCore.PostgreSQL.Scaffolding.Internal.GaussDBDatabaseModelFactory.GetTables(GaussDBConnection connection, DatabaseModel databaseModel, Func`3 tableFilter, String internalSchemas, HashSet`1 enums, IDiagnosticsLogger`1 logger)
at GaussDB.EntityFrameworkCore.PostgreSQL.Scaffolding.Internal.GaussDBDatabaseModelFactory.Create(DbConnection dbConnection, DatabaseModelFactoryOptions options)
at GaussDB.EntityFrameworkCore.PostgreSQL.Scaffolding.Internal.GaussDBDatabaseModelFactory.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 d
bContextClassName, 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 dbCon
textClassName, 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.b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Could not find the resource "GaussDB.EntityFrameworkCore.PostgreSQL.Properties.GaussDBStrings.resources" among the resources "DotNetCore.EntityFrameworkCore.GaussDB.Properties.Gaus
sDBStrings.resources", "DotNetCore.EntityFrameworkCore.GaussDB.Strings.resources" embedded in the assembly "DotNetCore.EntityFrameworkCore.GaussDB", nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with an incorrect name.
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Riprodurre il comando indicato dotnet ef dbcontext scaffold e confrontare il nome richiesto GaussDB.EntityFrameworkCore.PostgreSQL.Properties.GaussDBStrings.resources con le risorse incorporate in DotNetCore.EntityFrameworkCore.GaussDB. Tracciare la ricerca di GaussDBResources mostrata nello stack trace; il lavoro è completato quando lo scaffolding termina senza MissingManifestResourceException.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- backend, databases
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100