BT

EF Gets Public Mapping API, Ability To Handle Commit Failures

by Roopesh Shenoy on Mar 21, 2014 |

Entity Framework 6.1 was recently released with several interesting improvements such as better tooling, CommitFailureHandler, IndexAttribute, a Public Mapping API and more.

EF 6 was affected by slow startup time and entity materialization issues. These are reported fixed in 6.1 along with other performance improvements such as faster view generation in more scenarios and optimizations for null equality comparison in LINQ queries. Apart from this, several improvements have been made -

  • An Index Attribute - Allows creation of indexes on one or more columns when using EF Code-First. Supports both unique and non-unique indexes. 
  • A Public Mapping API - which enables developers to get access to the mapping metadata.
  • Handling of Transaction Commit Failures - network failures during commits can be tricky and stop the application from knowing whether the transaction was successfully committed on the server; if the operation is idempotent, you can retry it easily, but if it is not, then there needs to be a way to check with the server whether the transaction did commit. This new feature enables this with just a config change. And it works with the retries feature introduced in EF 6.

    Note that this feature uses a table to store commit information, which might need to be purged manually.
  • Support For ToString, String.Concat and enum HasFlags in LINQ Queries
  • Easier debugging with the ability to configure intercepters via app/web config and a couple of new interceptors (DatabaseLogger and IDbTransactionInterceptor)
  • Tooling consolidation - a single entry point for creating any data model (Designer, Code-first, import from database)

You can have a look at the specs for more detailed info on the changes. You can also see the issue tracker with filters to see all the issues worked on. 

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT