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

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube