Red Swan
Red Swan

Reputation: 15545

.net application architecture guidance

I am in confusion . Please guide me.

See, I have .net application (say for web application). which is n-trier . basically it is 3-tier. as usual. it having Presentation layer , business layer,Data access layer. Where as I am fetching the records in the Data layer in dataset and data tables where the found sophisticated. but when i am passing the data from data layer to business layer then what i have to use there . because as per my thinking the use of System.Data in business layer is not proper. it may harms the performance in case. then what should be the media to transfer data between these two layers?

another question in same scenario is , let say I have stored procedure in my database having user information insertion functionality. I want to pass the data from presentation layer to data later through the business layer. what is the correct way pass data vise versa between layers. I may use User Object. but in architecture level if i used User object then to pass the data, i need to access the User Object in all layers. so where should be the User object place in layers in application ?

Upvotes: 1

Views: 211

Answers (3)

DaeMoohn
DaeMoohn

Reputation: 1097

I would point you to domain driven design. But it may not suite you/your team because of the learning curve. You might not have sufficient time at hand.

Upvotes: 0

vc 74
vc 74

Reputation: 38179

You could use DTOs which are classes designed to transfer data between layers

Upvotes: 2

jgauffin
jgauffin

Reputation: 101130

Question one: Classes. Create a User class and return a IList<User> from the data layer to the business layer when reading from the users table.

Question 2: I use a separate assembly/class library which defines all business objects.

Upvotes: 2

Related Questions