News, examples, tips, ideas and plans.
Thoughts around ORM, .NET and SQL databases.

Monday, October 08, 2012

DataObjects.Net 4.6 goes final

I'm glad to announce that DataObjects.Net 4.6.0 is released. This post provides an overview of changes and improvements in 4.6 version. They would be explained with more details in future posts.

SQLite provider

SQLite has joined the list of supported databases.

Quick domain configuration example:

    <domain name="mySqliteDomain"
            providerName="sqlite"
            connectionString="Data Source=mydatabase.db" />


You'll also need to add reference to Xtensive.Orm.Sqlite.dll assembly in your project.

Mapping to multiple schemas and even databases

Since 4.6 it's possible to map persistent model to multiple schemas and databases.

The following examples maps model to two schemas based on entity namespaces:

    <domain name="myDomainWithTwoSchemas" defaultSchema="dbo">
        <mappingRules>
            <rule namespace="MyApp.Model.Foo" schema="foo" />
            <rule namespace="MyApp.Model.Bar" schema="bar" />
        </mappingRules>
    </domain>


I'll cover multi-mapping configurations in future posts.

Upgrade improvements

In this version we heavily reworked upgrade to be more fast and reliable. First major improvement is extensive usage of parallel computations, so now DataObjects.Net will perform some actions in parallel to build domain faster. Second major improvement is wrapping all upgrade actions in a single transaction if database supports transactional DDL. Previous versions of DataObjects.Net used two transactions in Perform and PerformSafely modes because additional upgrade domain was created.

Simplified key generator API

In DataObjects.Net 4.6 we changed API for key generators (both standard and user-written) to be more simple and intuitive. For example for creating custom key generator table or sequence you no longer need to write domain service. Simple [KeyGenerator(Name = "Foo")] will work just well. I'll explain new key generator API in details in future posts.

Final words

Just as always you can download packages from our site or NuGet gallery.

3 comments: