What to be Expecting of Entity Framework in .NET 4

May 14, 2009

What to be Expecting of Entity Framework in .NET 4

The ADO.NET team started What to be Expecting of Entity Framework in .NET 4
to release a series of posts
that describe the primary
scenarios and patterns they have
been working on throughout the
new release of Entity Framework
in .NET 4.0. The primary scenarios and
patterns you should be expecting:

Development Approaches

  • Model First development – 
    Enables the developer to start develop the model and then
    have T-SQL and customized code generated from that model.
  • Enable testing applications with Entity Framework – 
    A new interface was added, along with guidance, that enables better
    testability of applications that use the Entity Framework.

Architectural Concerns

  • Persistence Ignorance
    Enabling developers to use their own classes without the need to introduce
    interfaces or other elements specific to the Entity Framework.
  • Applications Patterns
    Discussing patterns like the Repository and UnitOfWork patterns with
    guidance on how to use them with the Entity Framework.
  • N-Tier applications with the Entity Framework
    Adding API’s and templates that make building N-Tier applications with
    the Entity Framework much easier.

Entity Framework Improvements

  1. Customization of Code Generation
    Integration with the ADO.NET Entity Framework Designer and T4 Templates
    in Visual Studio to provide developer controlled code generation.
  2. Small things that make development of applications simpler
    Add things like Pluralization and Singularlization in the model,
    lazy loading, and more stored procedure mapping make building
    applications that use the Entity Framework much easier.
  3. Customizing Queries
    Support for existing LINQ operators, recognizing a larger set of
    patterns with LINQ, writing model defined functions along with the ability
    to use these in LINQ, and a number of other ways to create and customize queries.
  4. SQL Generation Readability Improvements
    Improve the readability, along with T-SQL performance optimizations, of the
    generated queries.
  5. Bug fixes and more.

Summary

Lets sum up, a lot can be expected of the new Entity Framework release.
The ADO.NET team try to approach a lot of things that raised while developing
with Entity Framework V1. You can read the following posts for more details:

DotNetKicks Image
Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

2 comments

  1. Muradov Artem, RussiaMay 14, 2009 ב 13:22

    I have red, that in EF4 programmer will can work with foreign keys as just fields too. I mean, now I can’t insert product without recieve product_type from database, although i know product_type_id. Is it true??
    P.S. I’m sorry for my english, im just russian country’s programmer. 😉

    Reply
  2. Gil FinkMay 15, 2009 ב 11:46

    Hi Muradov Artem,

    If I get you right you want to insert a product type to a product when you have the product type ID. This can be achieved in EF V1 by defining an EntityReference with an EntityKey. For example:

    product.ProductTypeReference.EntityKey =

    new EntityKey(“ModelEntities.ProductTypes”, “ProductTypeID”, 1);

    By doing that you won’t need to load the ProductType from the database. Pay attention that if the key will not exists in the database you’ll get an exception.

    I hope it helps.

    Reply