Data Driver

Blog archive

VS2010 Compatibility and Code Only Extensions Arrive in EF 4 Feature CTP

One of the key pieces missing in Beta 2 of Microsoft's ADO.NET Entity Framework 4 was compatibility with Visual Studio 2010 Beta 2 and the completed Code Only extensions that the company promised (see Entity Framework Gets More Code Only Extensions)

Microsoft released Beta 2 of the Entity Framework 4 October 19th (see EF4 Beta 2 Arrives with New Features) addressing many of the shortcomings of version 1 such as its focus on the data aspect of entities and its failure to support POCO (Plain Old CLR Objects), lazy loading and persistence ignorance.

The first release was a database-design first framework rather than model-first, says Roger Jennings, principal consultant, OakLeaf Systems

Microsoft put the finishing touches on the Entity Framework 4 this week releasing the Feature Community Test Preview, which is now available for download.

"Hooray for compatibility, but more importantly, we can now work with a greatly enhanced version of the Code Only feature and Self-Tracking Entities," writes .NET consultant Julie Lerman in a blog posting. "Code Only is the API that allows you to use EF without a model at all. Self-Tracking Entities provides tracking for entities across WCF Services and their clients."

Lerman is author of the book Programming Entity Framework (O'Reilly and Partners, 2009) and is writing an update covering the new release. Among other things, she told me that Code Only will appeal to those critical of the Entity Framework's focus on XML.

"If you don’t want to deal with the model but you still want to be able to do the querying without having to worry about going back and forth with the database or physically having to create the model, those are the benefits Code Only gives," Lerman explains." Since the Entity Framework absolutely relies on the XML and metadata, what Code Only does at run time and on the fly is it creates that meta data, and gives it to Entity Framework to do what it needs to do."

According to the ADO.NET Team Blog, the Code Only improvements include the following:  

    • Fine Grained Control over model
      • Specify Navigation Property Inverses
      • Specify Property Facets
      • Complex Types
    • Customizable Mappings
      • Change Table Name, Column Names
      • Specify Custom Inheritance Strategy
      • Entity Splitting
      • Join Table Mapping

The CTP also includes the Self-Tracking Entities template, which permits code generation of Entity Framework 4 entities "that facilitate ease of use in WCF/N-Tier scenarios."

Lerman and others I've spoken with over the past two weeks describe the Entity Framework 4 as a vast improvement over version 1 though others say it still lags what's available in NHibernate and other object request mapping tools. A full report will appear in the December issue of Visual Studio Magazine.

Posted by Jeffrey Schwartz on 11/05/2009


comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube