Return DTO and DataTable from DAL

Is it good for DAL to return a DTO type from a domain model or just return a DataTable? Isn't it easier if your DAL functions return DataTables / DataSets and does the BLL have a data map for business objects?

+3
source share
2 answers

I think it really comes down to personal preference, but I like to avoid DataTables whenever possible.

They can be convenient at times, but the fact that they are not very typed usually makes debugging, testing, and just understanding the code much more difficult.

+3
source

, .NET, DataSet DataTables. , , , . Fowler Enterprise Application Architecture, Table Module Table Data Gateway.

- , (ORM mapper, Remoting Service layers ..). , Driven Driven Eric Evans

+3

Source: https://habr.com/ru/post/1740997/


All Articles