Why another ORM, there are so many on the market? While this is true, Kephas ORM is built over the Kephas Model with its unique multi-dimensional features. It contains two sub packages: Data Entities, which handles the domain objects, and Data Store, which handles the object persistance.
The data entities are the classes generated from the entities defined in the model. They are generated at design time, compiled, and then deployed together with the Kephas Framework runtime and the model space.
Data access levels
By default Kephas Framework provides two data access levels: pure data entities and data editors. Pure data entities are useful for time consuming operations like data import, or in read-only access for reporting. They are light-weight, but if data is edited using them it must be properly validated at a later time. The data entities are generated by the code generators explained above. Data editors are useful for UI and business logic operations. They are heavy-weight, but ensure consistent and validated data; data editors are actually wrappers on data entities.
Kephas Framework uses the so called ghost objects for lazy loading. Ghost objects load only the ID and the ToString() value, and when other properties are requested then the full load is triggered.
Real-life objects are complex; modeling them implies associations. Kephas Framework supports more kinds of associations, depending on their quality: simple association, aggregation, composition, facets (1:1 compositions, modeling business aspects).
Modeling domain logic
The domain logic adds life to the model. Kephas Framework supports the most common constructs for domain logic modeling; however the developer may define his own: behaviors (Visible, ReadOnly), validators (IsRequired, MaxLength, RegEx, so on), calculated properties, transient entities and properties.
The data store takes care of the persistance. Kephas Framework provides a minimal service interface which must be implemented by the actual data store connectors. There is no restriction whatsoever that the data store must be mapped on a relational database. Object databases, XML data stores, Excel files, all can be used as data stores. However, due to their popularity, the framework implements data store connectors for the most used relational databases.
Data store implementations
The framework provides out-of-the-box the following data store implementations: SQL Server 2008 R2, SQL Azure, Remote Data Store, MySQL 5.5+ (working), Oracle 10i+ (in plan).
Querying the data store
For the supported data stores, the framework comes also with a LINQ implementation. In fact, LINQ and DynamicLINQ are the data store querying languages, so that the code is free from error prone SQL strings.
For the supported implementation, the framework provides tools for developers for generation of SQL scripts.
Multi-data store support
Kephas Framework supports multiple data stores. A non-abstract model must be mapped on a data store where the instances are persisted. A nice feature is that cross-model/cross data store references are supported.