A
Andrew Robinson
Is there any way to specify a generic class as the TypeName for an ODS? Or
do I just need to do the same thing and wrap the generic class and in
inherited class?
Example:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DataObjectTypeName="Department" TypeName="MyDataHandler<Department>"
SelectMethod="Select" />
where:
[DataObject(true)]
public class MyDataHandler<D>
{
public MyDataHandler()
{
}
[DataObjectMethod(DataObjectMethodType.Select, true)]
public List<D> Select()
{
List<D> list = new List<D>();
// build the list
return list;
}
}
do I just need to do the same thing and wrap the generic class and in
inherited class?
Example:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DataObjectTypeName="Department" TypeName="MyDataHandler<Department>"
SelectMethod="Select" />
where:
[DataObject(true)]
public class MyDataHandler<D>
{
public MyDataHandler()
{
}
[DataObjectMethod(DataObjectMethodType.Select, true)]
public List<D> Select()
{
List<D> list = new List<D>();
// build the list
return list;
}
}