Unable to use Model.ToDebugString with EF Core 6 preview 4
See original GitHub issueInclude your code
var result =dbContext.Model.ToDebugString(MetadataDebugStringOptions.LongDefault);
And I am not able to find “DesignTimeModel” mentioned in the error message anywhere.
Include stack traces
System.InvalidOperationException: The requested configuration is not stored in the read-optimized model, please use 'DbContext.DesignTimeModel'.
at Microsoft.EntityFrameworkCore.Metadata.SlimModel.Microsoft.EntityFrameworkCore.Metadata.IReadOnlyModel.GetChangeTrackingStrategy()
at Microsoft.EntityFrameworkCore.Metadata.IReadOnlyModel.ToDebugString(MetadataDebugStringOptions options, Int32 indent)
at Modelling.EfCoreModelBuilder.BuildResult(String outputPath, String startupOutputPath, Boolean generateDdl) in C:\Code\EFCorePowerTools\src\GUI\efpt30.core\EFCoreModelBuilder.cs:line 41
at Modelling.Program.Main(String[] args) in C:\Code\EFCorePowerTools\src\GUI\efpt30.core\Program.cs:line 57
Include provider and version information
EF Core version: 6.0 preview 4 Database provider: Microsoft.EntityFrameworkCore.SqlServer Target framework: .NET 5.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
[Question] Where do column names get generated? #15581
Describe the problem. Can't configure TPH in EFCore 3.0.0-preview4 unless I am round-tripping my entire database using EF migrations. Steps to ...
Read more >I get an error when I add migration using Entity Framework ...
c# - I get an error when I add migration using Entity Framework Core - Stack Overflow.
Read more >Creating and Configuring a Model - EF Core
This model is built using a set of conventions - heuristics that look for common patterns. The model can then be customized using...
Read more >Entity Framework Core: View the model as text
Note: I use the preview version of Entity Framework Core 2.0 (2.0.0-preview2-final). Things may change after the final version is released.
Read more >106592: Unable to do Entity Framework Core Migration ...
Description: I was using the Nuget Package for MySql.EntityFrameworkCore package version 5.0.8+MySQL8.0.27.
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 Free
Top 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
Fixed in a60795c94b6fc071f1247474793bcf1adf8eaff8
@AndriySvyryd Thanks 😃