sql server - Is it possible create a copy of Entity Framework context's Instance to make parallel queries -
stack: angularjs, web api, entity framework, sql server.
i need query sql server parallel queries result faster.
i using web api , can split query separate web api calls, creates new copy of database context every web api call, but wondering if it's possible inside 1 web api call. ( assume need create separate copy of context every parallel query, entity framework not allow call multiple queries in parallel same instance of context).
i using unity di container creating context's instance.
well, can set-up container create new instance per call... on unity, suggest create named entry (using perresolvelifetimemanager
) , leave existing 1 rest of application (just segregate approaches)...
oh , remember dispose of these new contexts manually!
Comments
Post a Comment