资 源 简 介
doPersistence is a C# dll that persists any object to any database (SqlServer plug-in is complete).
For single objects add a class attribute:
[Persistable("Customers", "CustomerId", true)] //DataSource, PrimaryKeyName, UseDirectSql (if false, SPs are required)public class Customer { ...
For list objects, inherit from a generic list:
public class CustomerList : PersistentList
The list class exposes a generic List for LINQ expressions (sorting, selecting, etc.) Bulk storage is extremely fast and can be batched. Loads can be paginated.
Performance loading objects:
* 500 objects in 54 milliseconds (12 milliseconds, if paginated)
* ~10,000 objects/second
* ~2,000 objects/second if loaded one row at a time
See website (http://andrewbbrown.com) for example code. Or download zip file for working copy.