Project coordinators
Contributors
Vici CoolStorage is a fully typed Object Relational Mapping library for .NET 3.5 and MonoTouch.
The main strength of Vici CoolStorage is the ease of use. Most ORM tools still require a lot of unneeded 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.
Reading something from the database and writing it back is as simple as this:
Customer customer = Customer.Read(id);
customer.Name = "Microsoft";
customer.Save();
Working with relations:
Order order = Order.New();
order.Description = "my order";
// ...
Customer customer = Customer.ReadFirst("Name=@name","@name","Microsoft");
customer.Orders.Add(order);
customer.Save();
or collections:
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/2005, MySQL, SQLite, MS Access and VistaDB. Other custom providers can be added.
- Full support for MonoTouch (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)
MonoTouch support
CoolStorage can also be used in Monotouch. A seperate build for MonoTouch and SQLite is available from the download page. It has all the features listed above, but it is limited to the iPhone's built-in SQLite database format.
More info on MonoTouch support for CoolStorage can be found in the MonoTouch section