Samples

Coordinator
Dec 11, 2010 at 8:33 PM

Hi there,

I've gone through an excersise to add samples to the forms application to display the use of the ListEx.

To benefit from it, I would recommend that you look at the different activation options that are available.

  • Construct the ListEx as per normal List<T> functionality
  • also, pass any data reader without known type and receive a Dynamic created class collection
  • pass a data reader with a known type inherited from GenericDataObject with your readable properties.

When using a data reader to construct your ListEx, please call the Fill function to populate the collection with the reader information.

The DataAccess library was added per request, on the SqlCommand wrapper look at the ExecuteReader() method. You will see the IDataReader returned as a ListEx.

  • this ListEx can be received by either casting the data reader to your List<Type> or creating your own List type by passing the reader and known type to the constructor "List<Type>( IDataReader )".
  • note that the underlying type of the ListEx must be the same as the mapping type passed as a argument.

Otherwise, please add some comments to this project. I would really appreciate your input.

Regards

Zack Evans