I have 3 tables with 1:many parent child relation
- TableA
- TableB (child of TableA)
- TableC (child of TableB)
I am able to retrieve all of the data from these tables with query
var data = dbContext.tableA.where(a => a.ID == rowID)
.Include(a => a.tableB.Select(n => n.tableC)).SingleOrDefault();
For TableC
, I don't want all of the columns to be retrieved from database. I just want ID, TableC_FK
columns data to be retrieved for TableC
.
How do I do that?