My application is separated into three layers (presentation, business, and data access). Most of the pages in my application work like this:
[Presentation Layer]
public override void FillData()
{
grid.DataSource = AnimalBll.FindAnimal(
SessionHelper.GetLoginInfo(base.sessionId).First().Id);
grid.DataBind();
}
[Business Layer]
public static DataTable FindAnimal(int id)
{
var result = DBHelper.GetDataTableFromSP("FindAnimal", id);
return result;
}
As you can see I bind directly to the grid. So, why would I use an ObjectDataSource?