BT

InfoQ Homepage News EF Gets Public Mapping API, Ability To Handle Commit Failures

EF Gets Public Mapping API, Ability To Handle Commit Failures

Bookmarks

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. 

Rate this Article

Adoption
Style

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.

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

Community comments

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

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

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.