Wednesday, December 18, 2024
HomeProductsORM SolutionsFunctionality Improvements in the New Version of LinqConnect

Functionality Improvements in the New Version of LinqConnect

Devart is glad to announce a beta version of completely reworked LinqConnect ORM with better performance and large number of improvements.

New 4.0 version of LinqConnect marks a new milestone in LinqConnect development. Renewed LinqConnect demonstrates a new degree of performance and stability. Now it can be used in most complicated use cases and supports submit of very complex object graphs.

Starting from the 4.0 version, LinqConnect uses only its own classes. It does not reference the System.Data.Linq assembly any more, and this assembly is not loaded with your applications, using LinqConnect. However you don’t need to worry about LINQ to SQL compatibility. Public interface of our classes is completely compatible with the public interface of Microsoft LINQ to SQL classes. Moreover, we provide the Upgrade Wizard for easy upgrading of your LinqConnect projects to the new version of LinqConnect in a few clicks.

Cache Improvements

Now LinqConnect cache has two different modes. The first mode, classical, is recommended to use it when DataContext is used as a Unit of Work and is a short-lived object (Microsoft recommends to use LINQ to SQL DataContext in this way). In this mode DataContext uses hard links on all the entity objects and they are released when the DataContext itself is released.

The second, self-clearing mode is intended for applications when DataContext is considered as a long-lived object, not as a Unit of Work. In this mode, weak references to entity classes are used. When you don’t use an object any more, it is deleted from the cache and is not tracked any more. However this mode requires more memory and resources for tracking.

Submit Functionality

In the 4.0 version we redesigned the Submit functionality. The main improvements are the optimizations of tracking and submitting of the complex object graphs with the parent-child relation chains.

Submitting objects with many-to-many associations was also improved. Now it requires a smaller number of database calls. There is no database call when adding/deleting an object to/from a collection. When deleting an entity with an associated collection, one delete operation is performed for the associated table.

Delete rule behaviour was changed. Now this operation is executed by the database. LinqConnect removes the affected objects from cache after this operation.

Stored Procedure Mapping Improvements

New version of LinqConnect allows you to map stored procedure OUT parameters that return cursors to enumerable parameters of the corresponding DataContext method. Now you don’t need to mess with the ResultType attribute and ImultipleResult when working with stored procedures, returning cursors in Oracle and PostgreSQL.

Query Compilation Improvements

Query compilation algorithm was completely reworked to implement using of ILGenerator. Now the compilation is performed much faster and requires less RAM.

Materialization Improvements

In the new LinqConnect version we have optimized entity materialization algorithms greatly. Materialization of entities with associated entities is now 1,5 times faster, and materialization of entities, returned by stored procedures, is 4 times faster.

Compiled Query Cache Improvements

Now compiled queries and materialization functions are stored separately in the cache. This increases performance when executing different queries returning results of the same type.

Download LinqConnect and try our improvements now!

RELATED ARTICLES

Whitepaper

Social

Topics

Products