Good time!
I develop the Ideal project. I have some application design issues. It's difficult to me to understand how use DTO, DAL, BAL. For example I have 3 Business Entities: Order, Customer, Product (in SQL for about 10 tables).
Questions:
- What should I do with a lot of classes. There is a class generated by the ORM (EF) e.g
DBOrder
. There is a class (almost a copy)OrderDTO
. Which contains only fields fromDBOrder
(perhaps even related fields but also DTO). There is a business classOrderModel
(which pass from DAL to BAL). - If I want to work with some fields of full object (Product), should I create new DTO class (e. g. I need only Id and Name)?
- The same question for Business Logic Object.
I see 3 classes for 1 object (ORM, DTO, BLO). Is it ok?
Please, tell me truth.
Aucun commentaire:
Enregistrer un commentaire