After loading your business object with data from the database, there are several ways to interact with the data through EasyObjects.NET.
Method 1 - Strongly-typed properties
- Automatically generated for you in your business object.
- Matches the database type to a native language type.
Method 2 - The 's_' Properties
- Automatically generated for you in your business object.
- The property get accessor converts the column value from the native type to a string. A null value is automatically converted to an empty string.
- The property set accessor converts the incoming string value to the native type. An empty string is automatically converted to DBNull.Value.
- Ideal for binding to user interface elements, such as labels and textboxes.
- Dates are formatted using the StringFormat property of the base class.
Method 3 - MoveNext and Rewind
- Used to loop through all the rows stored in the business object.
- Rewind resets the enumerator back to the first row.
- Any filters applied are respected when changing the enumerator.
Method 4 - Filter
- Works the same as the RowFilter property on ADO.NET's DataView.
- Can be used to temporarily hide rows stored in the business object.
- MoveNext will not iterate over filtered rows.
Method 5 - DefaultView
- Used for DataBinding operations with databound controls, such as the DataGrid or ComboBox.