Persistence guidelines
The XOODBS goal is to provide a simple and powerful Persistence Framework that allows programmers :
- To define classes structure,
- To implement operations,
- To create, modify and delete instances,
- As they use the standard features of a .NET object language,
- And nothing else but select the type of a container and its location, as well as locking items.
Through a caching system, an ObjectEntityMapper handles in a transparent manner the presence of data items in the memories of the SessionManager and in the storage namespaces provided by the ObjectContainer.
In this way, instances of items stored in the database are conventionally used as if there is an unlimited and persistent 64 bits memory, according to the limits and performances provided by container, operating system, hardware and network connection.
The last limit is that an object, or a set of objects working together, whose size is not loadable in the physical and virtual memory of the system is not usable, unless they manage their own aggregated buffers, ie it is better to store data such as large multimedia items in separate files on disk.
You can see the Example Preview for more details.
// Remark : only value modifications can be cancelled or applied, not insert or delete
SessionManager session = new SessionManager < SQLiteContainer > ("db.bin", "user", "pwd");
session.AutoLockEdit = true;
var list = session.Alarms.FindInactive();
foreach (var item in list)
{
session.Alarms.Remove(item);
session.Recycle.Add(item);
}
session.Close();


