Click here to Skip to main content
15,885,878 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can you explain ,How to add reference to different layers
1.Presentation Layer
2.Business Logic Layer
3.Data Access Layer
4.Value Objects
Posted

Dataacess layer should have references to value objects.
Business logic layer should have reference to the data access layer.

The presentation layer would have access to either the business layer via either a direct reference or via web services or some other route.
 
Share this answer
 
Presumably, you know how to create each layer as a separate project within your solution?

So all you need to do is open the project (PL for example) and right click the "References" branch in the Solution Explorer pane.
Select the "Add Reference..." menu item, and then wait for the dialog (it can take a while to show).
Select the "Projects" tab (on the left hand side) then the project you are going to use (BL or DL for example). Press Add and then Close when you are done.
You can now use the layer classes in your project (but you will need to add the using statements as VS won't do that for you).

Do note that you shouldn't add references unless you need them: if you add them "because they are there" you will cause problems - you are not allowed to have circular references where PL refers to
BL and BL refers to PL (for example) either directly or indirectly via DL.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900