Sunday, May 27, 2007

Marking BLL Dataobjects

-CLASS

[System.ComponentModel.DataObject]
public class ProductsBusinessLogic

-METHOD

[System.ComponentModel.DataObjectMethodAttribute
(System.ComponentModel.DataObjectMethodType.Select, true)]
public ProductsDataTable GetProducts()

"The DataObject attribute marks the class as being an object suitable for binding to an ObjectDataSource control, whereas the DataObjectMethodAttribute indicates the purpose of the method. As we'll see in future tutorials, ASP.NET 2.0's ObjectDataSource makes it easy to declaratively access data from a class. To help filter the list of possible classes to bind to in the ObjectDataSource's wizard, by default only those classes marked as DataObjects are shown in the wizard's drop-down list. The ProductsBLL class will work just as well without these attributes, but adding them makes it easier to work with in the ObjectDataSource's wizard."

source: http://asp.net/learn/dataaccess/tutorial02cs.aspx?tabid=63
**************
nullable types

int?
decimal?

No comments: