entity framework - Breeze EFContextProvider per request and based on parameter? -


i have multi-tenant app in user can select "current company" after log in. there db per company model same, workflow same, , controller actions same....the user can switch companies while being logged in , actions need 'directed' proper db.

i know possible customize context creation in efcontextprovider<t> overriding createcontext() how pass info (parameter, e.g. companyid) allow me create context correct connection string?

is possible?

i find easiest way include tenant id in custom http header.

because tenant id changes during session, want create custom breeze ajax adapter (wrap 1 you're using now) sets header dynamically during implementation of ajax method.

on server fish header out of request.

make sure validating user , header on server


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -