by Raffaele Rialdi (English blog
, Italian blog
Microsoft Developer Security MVP
Before downloading sources, please download and read documentation project (v2.0):
The target of this project is a collection with stamina to use as a base class for custom collections when drawing an object model.
This fx 2.0 generic collection supports many features that BindingList<T> has not. Some of these features are:
- state handling (inserted/updated/deleted/...)
- transactional support (AcceptChanges, RejectChanges, ...)
- Sorting (with different solutions)
- Filter (with a custom parser and other solutions)
- Views (without copying the contents in another collection and sharing the collected objects)
- Designer support
In the project there are also a number of classes to help loading the object model from database. These classes obviously are not part of the collection but are only helper classes.
Additional Comments: This project derives from my 1.1 release that I presented on February 10, 2005 in the Data Management Workshop
I presented this version (2.0) in the "Dataset vs Custom Entities" during the WPC 2006 conference
on November 16, 2006.
The solution in this repository has four projects:
- RafCollection. This is the main project, the collection is here. The other projects are for testing purposes.
- DBHelper. This project contains only some code to map DBNulls when loading data from a database.
- NorthwindBizLayer. This is a very simple demo that defines some entities and the datalayer classes to load data from the database. The datalayer code is described in this document too. The entity in this project are for testing purposes only. They doesn’t describe a good example of an object model.
- NorthwindTest. This is a simple winform application to test binding and few other features. The connection string is stored in the app.config file and by default it connects to a local Sql Server looking for the Northind sample Sql Server database.
The main focus is on RafCollection project. Anyway if you are interested in enhance the other projects too, you are welcome.