Is it possible to design a single model class which includes other table definitions in razor pages.
Yes, in Entity Framework the relationships are called navigation properties.
Relationships, navigation properties, and foreign keys
In general, the design is a class with a collection property.
public class WidgetCategory
{
public int Id { get; set; }
public List<Widget> Widgets { get; set;}
}
public class Widget
{
public int Id { get; set; }
public string Name { get; set; }
}
Keep in mind, this type of information is covered in every beginning level ASP.NET Core tutorial.
Razor Pages with Entity Framework Core in ASP.NET Core - Tutorial 1 of 8
If you have a specific issue or the information above does not answer your question, then share code that illustrates the problem you are trying to solve and the expected results.