I am familiar with asp.net mvc development. In that framework passing complex objects (such as a list of objects) was as simple as creating the public static list in one controller:
public static List<T_Material> lstProducts = new List<T_Material>()
{
new T_Material {T_MaterialID = 1, Name = "Product1", Description="Description1", Price=20, MonthsOfAccess=20},
new T_Material {T_MaterialID = 2, Name = "Product2", Description="Description2", Price=20, MonthsOfAccess=20}
}
and referencing in another controller with the following code: ControllerName.lstProducts
I am building an application in asp.net core razor pages (using razor pages with a PageModel code behind file not MVC) and passing a complex object from one PageModel file is not simple at all. I feel like the answer to this should be obvious but I am still scratching my head.