Reputation: 13
I have 2 application web and desktop. both share Persistence layer. In Persistence layer we have one object of Ecospace shared by web and desktop app. Web is using Angular JS over MVC4 and desktop is winform app. Both are on .net 4.6.2 framework. we want to achieve multiple databases on a common web app. Each Organization has only one database to connect to but all share common web app for accessing their data or database.
Question:
1 Should i create ecospace object in my landing page and store it session to be used in other pages.
or how should i handle ecospace.
2 I want to connect to database in my Landing page based on organization the logging user belongs in context organization have different database and have common web application.
I have to do think of these questions due to fact that in my EcoModel i have Derived attributes which are based on current organization and it has to be set in order to those derived attributes calculate data other wise it will all be null or default type its returning.
Any suggestions please
Upvotes: 0
Views: 36
Reputation: 201
I'm not sure I understand how the ecospaces are related, but have you considered using APIs (viewmodels, Json) to be able to get data from multiple sources?
(Instead of integrating at the DB-level, do it on API-level)
There is good support for accessing other models using APIs via JSON: https://wiki.mdriven.net/index.php/Tajson
/Lars
Upvotes: 1