Working from http://help.dataobjects.net/##DataObjects.Net%20v4.5/html/bda59613-172c-427f-86fc-046ccd7e4253.htm I put together some code to try and solve an optimization problem. E.g.
Profiling this with the Red Gate ANTS performance profiler shows that this results in 2 SQL database calls. The first is for SELECT TOP 10 Parents, which is fine. The second is 10 separate queries for Children WHERE parentID=@p1_0 through parentID=@p1_10. Is there any way to make DataObjects use a single query (e.g. using JOIN) to prefetch the children? The database is running in Legacy_Validate mode. |
Hello GigMastersTech could you add the version of DataObjects.Net you're using?
We are using DataObjects.NET version 4.6.0.