Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Our business requirements required to create a layered and modular architecture. So I designed an architecture to make it as decoupled and as modular as possible. I will list my layers below

  • ASP .NET MVC Application (UI)
  • Business Logic Layer (BLL)
  • Data Access Layer (DAL)

I have further used IOC where each BLL module defines its Data Access requirements in terms of interfaces. So DAL has now to implement these interfaces.

It is important to note that

  • Both UI and DAL are dependent on the BLL
  • BLL is not dependent on any other solution. Using Interfaces I have done IOC so now DAL is dependent on BLL and not the other way round.
  • BLL is not just one project but a set of class library projects - one class library each for each business module.
  • DAL is a single class library project "shared" by all the BLL projects (since Database is same and it did not make sense dividing DAL into separate projects).

I will not go into details here but let us say there was a decision to use EDMX. However now I do not see how EDMX will fit into this mix. I believe I am not the only person ever to divide the BLL into different class libraries but have a single DAL project. But can EDMX or for that matter any ORM support such "distributed" architecture ?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

I assume by EDMX you mean Database First or Model First rather than Code First (POCO). You can still do code first with POCO's with an existing database if that's the reason for using EDMX.

However if you're absolutely stuck with an EDMX you can use POCO data transfer objects as a wrapper around the EDMX to isolate it from your BLL and top UI. This question about the same subject on Stack Overflow discusses this alternative.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.