We are currently havin a discussion if dataset should go in the data or business layer?
My friend thinks all ADO.NET components should go in data layer. For me this does not seem right for the followin reasons:
- If you create a fat Data Layer Client, it will be much more difficult to for example migrate everything to a different data source.
- You cant have bound controls unless you skip the business layer logic.
I think that datasets and datatables should be in the business logic since they are generic to all data providers. The data layer should have a Provider Factory for instantiating the right provider's objects (Connection, DataAdapters, Transactions,DataReaders, etc). For me this is the way to go for the following reasons:
- Migrating to a different data layer is as easy as it gets.
- You can bind your controls to rich business objects
Can some n-tier guru help us clear out wich way to go? Thanks in advance