This project is read-only.
Q: What is OverStore?
A: OverStore is object-relational mapper, it allows working with database data via CLR classes.

Q: Does OverStore supports generation classes by database schema, or generating database schema by classes?
A: No, it doesn't. OverStore supports code-first pattern. You need to create classes and database manually, then map classes to database tables.

Q: Has OverStore LINQ provider?
A: No, it doesn't. Since .NET Compact Framework doesn't provide required infrastructure LINQ 2 SQL is not supported.

Q: Does OverStore allows to get data from database using stored procedures, table functions, views etc?
A: Yes, you can use any sql command supported by your database. It is only requires resultset must have all columns specified in mapping section of repository.

Q: What are the main terms I should know to better understand OverStore?
A: There are few terms that allows you to understand OverStore documentation better:
  • Entity - class which can be persisted with OverStore. Usually represents record in database table, each instance corresponds to table row.
  • Session - main object provides set of methods allow to persist entities: load and save entities, entity collections and entities sequences. Session class implements IPersistenceSession interface. Session is created using method of Configuration.
  • Configuration - special class provides set of methods for configure persisting entities. Consists of set of entity repositories and some common configuration parameters.
  • Repository - set of parameters describe how to persists specified entity.
  • Reader - configuration describes how to read sequence of entities from database.

Q: How should I configure OverStore to save instance of specified type in specified table?
A: You need to configure repository for that type. You can do this by using MapClassToTable. If you need specified persisting features, you may use CustomClassRepository, see documentation for more information.

Q: What should I do to read collection of entities from the database?
A: You need to specify reader for entity. Use ParameterlessReader or ParameterizedReader methods to configure reader. You may specify single parameterless reader for entity, and any number of readers which are different by parameter type.

Q: How to pass parameters to reader?
A: First, you need to create class with properties corresponding to parameters. Then, you need to configure ParameterizedReader and use the class as parameters. After that you can use CreateReader method of IPersistenceSession interface and pass instance of parameters to this method.

Q: Does OverStore supports any kind of language for generating SQL commands from the code (like other ORMs do, for example LINQ2SQL or NHibernante HQL)?
A: No, it doesn't. All queries you are going to use must be predefined using parameterless reader or parameterized reader. After that you can access query result using IPersistenceSession.CreateReader overloads.

Q: How can I specify few readers for the entity?
A: You can do this by configuring few parameterized readers with different parameter type. After that reader actually executes on IPersistenceSession.CreateReader<TInstance, TParameter>() is defined
by generic argument for TParameter type.

Q: Can I configure few parameterless readers for the entity type?
A: No, there is only one parameterless reader for the entity can be specified.

Q: What main steps should I perform to start working with OverStore?
  1. Create class for entity
  2. Create table where entity data will be stored
  3. Create method that builds OverStore configuration. Start from calling OverStoreFluent.Configure() method. Minimal set of things you need to configure are:
    • Database connection type and connection string
    • Repository for entity
    • If you need to select all entities from table you need to specify parameterless or parameterized reader
  4. Use CreateSession method of configuration to start new session
  5. Use session method CreateReader to read entity set from the database
  6. Make changes to entities
  7. Call SaveAll method of session to save changes made to entities.

Q: Does OverStore supports transactions?
A: Sure, just use OpenScope method of session and call Complete method of scope to commit database transaction. Transactions that belongs to the same session may be nested, and database transaction will be commited on the most top scope completion. Note that operation scope does not support distribute transactions, different transaction isolation methods, also it does not support starting new transaction in nested scope.

Q: What entity services provided by OverStore?
A: OverStore supports identity mapping, unit-of-work, changes tracking, lazy loading, persistence ignorance patterns. Lazy loading requires from class to implements specific inteface.

Q: Does OverStore requires from entities to be inherited from specified class or implement some interface?
A: Actually, no. But lazy loading requireds from entity type to implement IDefferedLoadingSupport interface.

Q: What about references, aggregates and assosiation? What does these things are? What the difference? OverStore supports persisting of complex entity graphs?
A: First yes, OverStore supports persisting of all that things. The difference between references, aggregates and assosiations is easies explain in terms of relataional databases.
Let us have table T1, and entity E1 is mapped to the table.
  • If table T2 references T1 with one-to-many relation, where T1 is 'many' side of that relation, this is a reference. In domain model such relation is represented by property of E1 class which holds reference to E2 entity.
  • If table T3 references T1 with one-to-many relation, where T1 is 'one' side of that relation, this is assosiation or aggregation. There are no difference between assosiation or aggregation for OverStore. Aggregates usually represented as collection of E3 in E1 instance. Use MapCollection fluent method for table mapping, and Hierarchy().CollectionAggregate() method for CustomRepository.

Last edited May 7, 2011 at 4:33 PM by sergeyt, version 3


Shmilya_Golem May 14, 2012 at 9:31 AM 
Can the overstore support sqlite?