Monday, May 21, 2018

How to organize objects in layered architecture

I have an asp.net core API app. I have a service layer with my controllers Business layer Repositories that wrap around entity framework.

I have dtos that are mapped from entity framework in the repository and are passed up through the business layer to my service and then to the client.

My question is should there be another set of objects at the service layer that those dtos get mapped to? Something like a view model? I'm returning json so I just serialize the DTO to the client.

I have the same issue on the request side. It seams redundant to create another set of objects but is there a problem that solves down the road I don't know about?

How to organize objects in layered architecture Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team