The industry wide practice for writing code in BAL is to have properly defined objects from DAL. Let me explain you the above one liner with an example.
Let say you are returning a dataset having a datatable containing records of cars. Each record represent a car with fields say Model, BHP, Type.
Model | BHP | Type
Lexus | 250 | Sedan
Jaguar| 600 | Sedan
Toyota| 550 | SUV
If you analyse the above data you would see that each row is an object representing a car. So you can make a class say:
public class Car
{
public string Model { get; set;}
public int BHP { get; set; }
public string Type { get; set; }
}
Now, you can fill each row into the above Car object and the entire table into
IEnumerable<Car>
By following the above approach, you can work purely on objects and you can avoid using Datasets/datatables in your BAL and other higher layers on n-Tier applications.
The easiest way to achieve the above transformation is by creating an object mapper in DAL which would convert your
DataTable
into
IEnumerable<Car>
object and return it to your BAL