Besides thread insecurity, DbContexts should not live long. Therefore, you should use 2. (Or even one instance of DbContext for each Db operation).
If your “fairly easy access to multiple DB tables” is really simple, I would recommend that you use OData and some advanced js client like breeze.js.
Please look at the sites:
- ASP.NET Web API OData Provides Data as a Simple REST Service
- breeze.js this library provides extended js functionality similar to the function offered by DbContext, but from the browser side: syntax similar to LINQ, local (browser) data caching ...
You can also directly use the OData service (e.g. using jQuery AJAX) or with a simpler library (datajs, JayData)
source share