LINQ to SQL

LinqConnect and ORMBattle.NET

ORMBattle.NET has recently updated their results of testing various .NET Framework ORMs and added LinqConnect to their lists. LinqConnect demonstrates one of the best results it their tests.

ORMBattle.NET is an open-source project for ORM comparison, supported by a development team from X-tensive.com. This project contains a set of tests for feature-oriented comparison, but it is more focused on the performance tests (CRUD operation performance, object materialization, etc.).

LinqConnect development team agrees with most of the tests. The results on the whole are reliable enough to consider them when choosing ORM framework.

We already are studying the situations where LinqConnect showed bad results and working on performance improvement.

Enumeration Support

Introducing

We keep receiving requests about enumeration support in Entity Developer from our customers. That’s why we plan to implement this functionality in the second half of 2010.

In this article we describe the functionality concerning enumeration support we plan to add. It is only a draft and these features are a subject to change. It depends on the customer suggestions in many respects, so if you have any suggestions or requirements concerning this functionality, please write them as comments to this article or in any other way comfortable for you.
(more…)

Working with transactions in Entity Framework and LINQ to SQL

Entity Framework

In this article we consider a short description of the Entity Framework and LINQ to SQL transactional models. There are also some simple code listings illustrating different aspects of the transactional model.

A transaction is a series of operations performed as a single unit of work. Entity Framework transactions are a part of its internal architecture. The SaveChanges method operates within a transaction and saves results of the work. It is designed to ensure data integrity. The common reason of integrity problems is a Concurrency violation, which can be raised during the saving process. Concurrency violation occurs an OptimisticConcurrencyException in this case. To resolve this conflict you have to call the Refresh method with the StoreWins or ClientWins value, and after that call SaveChanges again. But be aware, that the Refresh with the ClientWins option can be a source of problem too. It rewrites all changes made to the data after context query execution.
(more…)