SQLGeography column mapping InvalidOperationException
See original GitHub issueWhen refreshing our entire database with the new EFCore Power Tools (2.5.966) the following exception is thrown and not generate any function or stored procedure, only the tables:
System.InvalidOperationException: Reverse engineer error:
System.ArgumentOutOfRangeException: cleanedTypeName: HQDevel_grpc.sys.geography (Parameter 'storeType')
at SqlDbType RevEng.Core.SqlServerSqlTypeExtensions.GetSqlDbType(string storeType) in C:/Code/EFCorePowerTools/src/GUI/RevEng.Core/Procedures/SqlServerSqlTypeExtensions.cs:line 118
at Type RevEng.Core.SqlServerSqlTypeExtensions.GetClrType(string storeType, bool isNullable) in C:/Code/EFCorePowerTools/src/GUI/RevEng.Core/Procedures/SqlServerSqlTypeExtensions.cs:line 204
at Type RevEng.Core.SqlServerSqlTypeExtensions.ClrType(ModuleResultElement moduleResultElement) in C:/Code/EFCorePowerTools/src/GUI/RevEng.Core/Procedures/SqlServerSqlTypeExtensions.cs:line 83
at void RevEng.Core.Modules.SqlServerRoutineScaffolder.GenerateProperties(List<ModuleResultElement> resultElements, bool nullableReferences) in C:/Code/EFCorePowerTools/src/GUI/RevEng.Core/Routines/SqlServerRoutineScaffolder.cs:line 165
at void RevEng.Core.Modules.SqlServerRoutineScaffolder.GenerateClass(List<ModuleResultElement> resultElements, string name, bool nullableReferences) in C:/Code/EFCorePowerTools/src/GUI/RevEng.Core/Routines/SqlServerRoutineScaffolder.cs:line 151
at string RevEng.Core.Modules.SqlServerRoutineScaffolder.WriteResultClass(List<ModuleResultElement> resultElements, ModuleScaffolderOptions options, string name) in C:/Code/EFCorePowerTools/src/GUI/RevEng.Core/Routines/SqlServerRoutineScaffolder.cs:line 136
at ScaffoldedModel RevEng.Core.Modules.SqlServerRoutineScaffolder.ScaffoldModel(RoutineModel model, ModuleScaffolderOptions scaffolderOptions, ref List<string> errors) in C:/Code/EFCorePowerTools/src/GUI/RevEng.Core/Routines/SqlServerRoutineScaffolder.cs:line 88
at SavedModelFiles RevEng.Core.ReverseEngineerScaffolder.GenerateStoredProcedures(ReverseEngineerCommandOptions options, ref List<string> errors, ServiceProvider serviceProvider, string outputContextDir, string modelNamespace, string contextNamespace) in C:/Code/EFCorePowerTools/src/GUI/RevEng.Core/ReverseEngineerScaffolder.cs:line 168
at ReverseEngineerResult RevEng.Core.ReverseEngineerRunner.GenerateFiles(ReverseEngineerCommandOptions options) in C:/Code/EFCorePowerTools/src/GUI/RevEng.Core/ReverseEngineerRunner.cs:line 94
at int efreveng.Program.Main(string[] args) in C:/Code/EFCorePowerTools/src/GUI/efreveng/Program.cs:line 63
at ReverseEngineerResult EFCorePowerTools.Handlers.ReverseEngineer.ResultDeserializer.BuildResult(string output)
at async Task<ReverseEngineerResult> EFCorePowerTools.Handlers.ReverseEngineer.EfRevEngLauncher.GetOutputAsync()
at async Task<ReverseEngineerResult> EFCorePowerTools.Handlers.ReverseEngineer.EfRevEngLauncher.LaunchExternalRunnerAsync(ReverseEngineerOptions options, CodeGenerationMode codeGenerationMode, Project project)
at async Task EFCorePowerTools.Handlers.ReverseEngineer.ReverseEngineerHandler.GenerateFilesAsync(Project project, ReverseEngineerOptions options, Tuple<bool, string> containsEfCoreReference)
at async Task EFCorePowerTools.Handlers.ReverseEngineer.ReverseEngineerHandler.ReverseEngineerCodeFirstAsync(Project project, string optionsPath, bool onlyGenerate)
With the previous version 2.5.918 everything is work fine. I can’t reproduce it with my minimal repo like #1368, so please see the code according to the stack, and I pray if something is shown. 😃
Thanks.
Issue Analytics
- State:
- Created a year ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
The given ColumnMapping does not match up with any ...
InvalidOperationException : The given ColumnMapping does not match up with any column in the source or destination. at System.Data.SqlClient.
Read more >The given ColumnMapping does not match up with any ...
The problem is with the s.ColumnMappings.Add(column.ToString(), column.ToString()); and mapping of your destination and source tables. At least ...
Read more >Sql image data type can't be mapped to SqlBinary in ...
Description Having a sql server table with a column image data type is not mapping to SqlBinary and only maps to byte[].
Read more >Entity Framework Core: System.InvalidOperationException ...
This exception happens when you try to map a type that is not supported by EF Core. Either change the type of the...
Read more >OracleBulkCopyColumnMapping...
If a ColumnMapping is not specified, then, by default, columns are mapped based on the ordinal position. This succeeds only if the source...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fixed in latest daily build
Thank You very much!