Skip to main content
Commonmark migration
Source Link

Context

##Context WebWeb application based on the .NET Framework written in C# and following the MVC design pattern.

Question

##Question WhatWhat is the most efficient way to structure an entity layer consisting on various data inputs?

Background

##Background II 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?

Many thanks!

##Context Web application based on the .NET Framework written in C# and following the MVC design pattern.

##Question What is the most efficient way to structure an entity layer consisting on various data inputs?

##Background 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?

Many thanks!

Context

Web application based on the .NET Framework written in C# and following the MVC design pattern.

Question

What is the most efficient way to structure an entity layer consisting on various data inputs?

Background

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?

Many thanks!

Source Link
Matt Cashatt
  • 3.3k
  • 5
  • 26
  • 35

Proper & Efficient Structure for an entity layer?

##Context Web application based on the .NET Framework written in C# and following the MVC design pattern.

##Question What is the most efficient way to structure an entity layer consisting on various data inputs?

##Background 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?

Many thanks!