for example:
class repository {
private DataContext db = new DataContext();
public IQueryable<Blah> someMethod(int id){
return from b in db.Blah ... select b;
}
public IQueryable<Blah> someMethod2(int id){
return from b in db.Blah ... select b;
}
public IQueryable<Blah> someMethod3(int id){
return from b in db.Blah ... select b;
}
}
OR
Should we make a new DataContext WITHIN each of those methods?
I think we are having some errors once user load increases due to us only having ONE DataContext per Repository instance, is this an accurate assumption?