I have a scenario where I need to pull approximately 7500 database records where each records has 6 child entity lists. Each of those child lists could be 0 to approximately 125 records.
My class structure kind of looks like this:
public class Entity
{
public int ID { get; set;
public string Name { get; set; }
public ICollection<ChildEntity1> Children1 { get; set; }
public ICollection<ChildEntity2> Children2 { get; set; }
public ICollection<ChildEntity3> Children3 { get; set; }
public ICollection<ChildEntity4> Children4 { get; set; }
... 2 more collections
}
After I retrieve all of the Entities, I need to iterate over each one and perform some calculations, call some web services and other various things and ultimately export to a file.
What are the best strategies for retrieving this data from MS Sql Server 2008 using c# 4? Is a DataSet with DataAdapters the best way? ORM?
I want to stay away from select N+1 scenarios for obvious reasons.