If at all possible, try and separate them into meaningful lines.
100 objects in context may seem bad, but think about your alternative, 100 different contexts?
Then you have to do something like
using(CompanyContext cc = new CompanyContext) { } using (CountryContext cc = new CountryContext) { }
If you needed to query multiple tables, you would have nested contexts, and that would get ugly. You will start things like
using(CompanyContext comp = new CompanyContext) { using (CountryContext country = new CountryContext) { } }
I canβt imagine that the performance will be improved, but Iβm sure that the service will be painful.
source share