© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
3 replies
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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Razor pages view
C#CC# / help
4y ago
Stuck on ASP.NET Razor EF core tutorial
C#CC# / help
2y ago
EF Core mapping to Viewmodels without duplicating viewmodels
C#CC# / help
6mo ago
✅ Can I create a Liststring in mssql ef core?
C#CC# / help
4y ago