Web application based on the .NET Framework written in C# and following the MVC design pattern.
What is the most efficient way to structure an entity layer consisting on various data inputs?
I am developing an application for a client that requires my reading and writing data from various sources and I would like to build a single entity layer/model to abstract the various data sources so that I only need to query the unified model from code. Here is an example of the disparate sources:
- MS SQL Data Warehouse (about 200 tables of enterprise-wide data
- MS Dynamics AX web services
- A new MS SQL database that is specific to the application being developed
- MS Active Directory for authenticating users and for getting user profile and group information.
- In some cases, SharePoint web services.
I have used ADO.NET a good bit (.edmx files and so forth) and fundamentally, I know how to do this but I am struggling a bit with a solid, clean approach. Do I create two separate .edmx files for the two SQL DBs and then write object classes for the Active Directory, SharePoint and AX stuff? Do I simply write one big model file? A whole separarate project just to make the abstraction?