- Philippe Leybaert (Lead developer)
- Björn Bailleul
- Niels Rymenams
Vici CoolStorage is a fully typed Object Relational Mapping library for .NET 3.5, Windows Phone, MonoTouch and Mono for Android.
CoolStorage is currently (May 2012) the only ORM that runs on Windows Phone for local data access using SQLite in isolated storage.
The main strength of Vici CoolStorage is the ease of use. Most ORM tools still require a lot of boilerplate code to accomplish basic data persistence tasks, but Vici CoolStorage is designed to relieve the programmer from these tedious and error-prone tasks, making it very intuitive to use. You won't have to worry about contexts, state, transactions (although you could) as all operations are context-free.
Reading something from the database and writing it back is as simple as this:
Customer customer = Customer.Read(id);
customer.Name = "Microsoft";
Working with relations:
Order order = Order.New();
order.Description = "my order";
Customer customer = Customer.ReadFirst("Name=@name","@name","Microsoft");
foreach (Customer customer in Customer.List())
var bigOrders = customer.Orders.FilteredBy("Total > 10000");
foreach (Order order in bigOrders.OrderedBy("Date"))
// do something with "order"
This is just a taste of the way CoolStorage works. Check the documentation or feature list for more info.
CoolStorage main features:
- Supports SQL Server 2000-2010, MySQL, SQLite, MS Access and VistaDB on .NET (Other custom providers can be added)
- Full support for MonoTouch, Mono for Android and Windows Phone (using SQLite)
- Session-less and context-free database access
- Any existing relational data model can be mapped to CoolStorage objects with minimal effort
- No code generator required. Mapping is done by creating simple classes.
- All relation types are supported: One-To-Many, Many-To-One and Many-To-Many
- Completely typed object model (no type casts required)
- Dirty tracking on the column level. Only changed fields are persisted to the database
- Full support for transactions, including ##TransactionScope##
- Nullable columns can be mapped to nullable fields or to a default value
- Delayed (lazy) loading of data to minimize database access. Configurable per field.
- Selective or automatic prefetching of all relation types for improved query performance
- Powerful and intuitive database-independent object query language
- Flexible event mechanism to intercept any event
- Identity (auto-increment) keys or sequences are supported for all database types
- Support for server and client generated Guid keys
- Objects can be mapped to different databases, even across object relations
- Paging of object collections (at server level)
- Extensive support for retrieving aggregate values on collections (count, sum, average, ...)
- Collections implement IBindingList so they can be used by controls (grids) as a data source
- Underlying database engine uses optimized and parameterized SQL queries. SQL injection is impossible
- Built specifically for .NET 2.0 and up, taking full advantage of generics and nullable types
- Raw SQL and/or stored procedures can be called on the underlying database without the need for a separate database connection
- Small footprint (less than 250 KB, including Vici Core)
iPhone/iPad and Windows Phone support
CoolStorage can also be used on iPhone and Windows Phone (using Monotouch). A separate build for these platforms is available from the download page. It has all the features listed above, but it is limited to the SQLite database format.
More info can be found in the MonoTouch and Windows Phone section