1

I'm designing a web service that returns simple query information. Using webApi & EF5. Easy. The problem I need help solving is this. We have 15 SQL servers with a combined 200+ databases. The schemas are all the same. Each DB is customer/case specific. So the API gets called with a case# and finds the sql server & db name from a lookup table.

I know how to set the dbContext to a specific connection string. So telling EF5 what to connect to is easy enough. It seems I will be losing any connection caching capabilities by having to switch DB's with every call.

On a busy day, we'll have 10-60 users per case #, and about 20 cases a day. (read 20 unique DB connections a day)

Should I create my own connection cache inside my WebAPI? As simple as a List of last used connections? Or will EF5 just work?

4

0 回答 0