如何使ObjectDataSource与单例Business对象一起使用?
我的单件业务对象在Global中定义:
public class Global : HttpApplication
{
public static BusinessForm BusinessFormLayer;
void Application_Start(object sender, EventArgs e)
{
FormDalProvider concreteProvider = FormDalProvider.Instance;
BusinessForumLayer = new BusinessForum(concreteProvider);
}
}
我的页面:
<asp:ObjectDataSource ID="objThreads" runat="server"
SelectMethod="GetForms"
SelectCountMethod="GetFormsCount"
TypeName="Global.BusinessFormLayer"
EnablePaging="true"
SortParameterName="sortExpression">