Could not get the reflection type for DbContext
when using required
keyword in model
#2546
Labels
Could not get the reflection type for DbContext
when using required
keyword in model
#2546
I was following along with this API tutorial when I came upon an odd exception. It took a bit of guess-and-check testing, but I narrowed it down to only occur when the
required
keyword is added (below is the example model).The tutorial lists the .NET 7.0 SDK in the prerequisites. From what I've found in the documentation, that should use C# 11 (which is when the
required
keyword was introduced). Is this an issue with theaspnet-codegenerator
tool, the documentation, or my own misunderstanding?Code:
Stack Trace:
Include provider and version information
Microsoft.VisualStudio.Web.CodeGeneration.Design version: 7.0.0
Target framework: .NET 7.0
Operating system: Windows 11
IDE: VS Code 1.82.2
The text was updated successfully, but these errors were encountered: