Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
478 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
public Class MyCataA {
public int Id{get;set}
public int TopId{get;set;}
}
public Class IMGA
{
public int Id{get;set;}
public string ImageUrl{get;set;}
public int CateId{get;set;}
}
I am using entityframework and I want to get the list of the images which CateId
is in MyCateA
;
There is a list of maybe 10 of MyCateA
that TopId= 0
and others TopId = its Top Category.
how to get the list?
now I have to get the list of TopId= 10
and using for to get each sub Categories and then get the images.
Use ThenInclude to include multiple levels. Please read the official documentation.