I am looking for how to use the 'Include' method to specify related data for the EntityTableData or DataSyncClientData objects in the Microsoft.Datasync library. I would like to achieve something like below:
var data = await _remotetable
.Include(x => x.ParentTable)
.ToListAsync();
How do I achieve that?
Below are the steps I followed:
ADbContext class is defined that inherits from DbContext. It consists of DB set properties for two tables
NewTableandParentTable.NewTablehas navigation propertyParentTablerepresenting a relation between the two tables.Relationship is determined by the
ParentTableIdforeign key property inNewTable.I used Entity Framework core to query the
NewTablewith.Includemethod. It loads relatedParentTableentities.Code I tried with:
Output: