Posted
on Jan 5, 2012
(permalink)
Hi
I'm trying to retrieve only current object ,not including children objects:
FetchStrategy fetchStrategy = new FetchStrategy();
fetchStrategy.MaxFetchDepth = 1;
fetchStrategy.MaxResultsLimit = 1;
dbContext.FetchStrategy = fetchStrategy ;
IEnumerable<Sample> samples = dbContext.Sample.Where(s => s.SampleBarcode == sampleBarcode);
but result includes many children object,such as Sample.SampleItem ...
Tell what should I do .
Thanks
Dgyang