I was trying to generate Minimal APIs for the Northwind database. I generated the entities with dotnet ef scaffold command with data annotation support. After scaffolding some entities generated with Keyless attribute.
[Keyless]
public partial class CategorySalesFor1997
{
[StringLength(15)]
public string CategoryName { get; set; } = null!;
[Column(TypeName = "money")]
public decimal? CategorySales { get; set; }
}
When I run the application - MapInstantAPIs failed with KeyNotFoundException.
I think we should skip the tables with the Keyless attribute.
I was trying to generate Minimal APIs for the Northwind database. I generated the entities with
dotnet ef scaffold
command with data annotation support. After scaffolding some entities generated withKeyless
attribute.When I run the application -
MapInstantAPIs
failed withKeyNotFoundException
.I think we should skip the tables with the
Keyless
attribute.