Cătălin Rădoi
Cătălin Rădoi

Reputation: 1894

Presentation <?> Domain <?> Persistence

Ok So I have a

How do I link these 3? (references)

Upvotes: 2

Views: 717

Answers (1)

chomba
chomba

Reputation: 1451

In a typical 3-tier Application architecture, you usually make your Data Access Layer (Data Persistence Layer if you will) reference your Domain Layer - You shouldn't add a reference from your Domain Model to your DAL, that'll create a circular dependency problem.

You then orchestrate the interaction between your Domain and Data Access Layers in your Presentation Layer (MVC App in your case).

In short:

  • Your DAL should reference your Domain Layer.
  • Your Presentation Layer should reference both your Domain Layer and DAL

Upvotes: 2

Related Questions