Business Logic access via objectdatasource

Topics: General Discussion Forum
Jul 26, 2007 at 10:38 PM
I have managed to integrate WSSF and WCSF in one solution.
I have a BusinessLogic class, which returns a List<> collection. Now should I access it via the controller class of WCSF or ObjectDataSource.
You suggestion will be appreciated.


namespace BV2.BusinessLogic
{
System.ComponentModel.DataObject
public class AttributeMgr
{
System.ComponentModel.DataObjectMethod( System.ComponentModel.DataObjectMethodType.Select, false)
public List<BusinessEntities.Attribute> GetForAvailability()
{
AttributeRepository rep = new AttributeRepository("BV2ConnectionString");
List<BusinessEntities.Attribute> attributes = rep.uspAttributeGetForAvailability();

return attributes;
}
}
}

It works brilliantly in the aspx

<asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="ObjectDataSource1"
DataTextField="AttributeName" DataValueField="AttributeID">
</asp:CheckBoxList><asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetForAvailability"
TypeName="BV2.BusinessLogic.AttributeMgr" OldValuesParameterFormatString="original_{0}"></asp:ObjectDataSource>