C#C
C#4y ago
Heartbeat1

EF Core Razor Pages and an MSSQL View

Hi Everyone,
i am trying to create an Page in Razor for an MSSQL View.
I have two tables shown in the Screenshot which are linked in the View.
The view as it self works fine in MSSQL.
No i created the Model Class for it

[Keyless]
public class MarketView
{
public long ItemID { get; }
public string Fullname { get; }
public decimal averagebuyPrice { get; }
public decimal averagesellPrice { get; }
public decimal maxsellPrice { get; }
public decimal minsellPrice { get; }
public decimal maxbuyPrice { get; }
public decimal minbuyPrice { get; }
public DateTime Actdate { get; }

}

No when i am trying to create an EF Page with it it says no Key Found how can i manage it that VS creates an page for it?

Thanks for your Help 😉
unknown.png
unknown.png
unknown.png
unknown.png
Was this page helpful?