You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.
Using latest ASP.NET Core with latest Nuget on Visual Studio 2019 windows 10 pro.
If I try to create an Edit view based on a view model that isn't configured in the DB context (e.g., it's a model that doesn't map to a DB table in EF), even after adding the [Key] annotation I get the error:
'The entity type 'RoleEdit' requires a primary key to be defined. If you intended to use a keyless entity type call 'HasNoKey()'.'
I can't use HasNoKey since the model entity isn't in the context since it isn't a real table.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Using latest ASP.NET Core with latest Nuget on Visual Studio 2019 windows 10 pro.
If I try to create an Edit view based on a view model that isn't configured in the DB context (e.g., it's a model that doesn't map to a DB table in EF), even after adding the [Key] annotation I get the error:
'The entity type 'RoleEdit' requires a primary key to be defined. If you intended to use a keyless entity type call 'HasNoKey()'.'
I can't use HasNoKey since the model entity isn't in the context since it isn't a real table.
The text was updated successfully, but these errors were encountered: