Share via


VS2010 and .NET Framework 4 Beta 2 Announced!

 


The information in this post is out of date.

Visit msdn.com/data/ef for the latest information on current and past releases of EF.


 

Visual Studio 2010 and the .NET Framework 4 Beta 2 are now available for download by MSDN subscribers and will available to the rest of the world on Wednesday. Beta 2 as well the VS2010 Launch date of March 22, 2010 were announced this morning on Soma’s blog.

Included in Beta 2 are some great new features and updates for the Entity Framework 4 and ADO.NET Data Services 4.

Entity Framework 4 Beta 2

In addition to all of the new EF 4 features that were included in Beta 1, Beta 2 also includes:

  • Foreign Keys: EF 4 now includes a new type of associations (Foreign Key Associations) that allow you to have Foreign Key properties on your entities. Foreign Key Associations simplify some key scenarios such as Data binding and can be included or excluded when using the model creation and update wizards. Independent Associations supported in .NET 3.5 remain as is, but Foreign Key Associations become the default type of association going forward. Referential integrity constraints can now be created from the designer.
  • Improvements to POCO Support: Fix-up of changes to navigation properties and FKs is now performed automatically on DetectChanges and SaveChanges. It is also now possible to declare collections as ISet<T> in POCO objects. When either ICollection<T> or ISet<T> is used, the default collection type materialized is HashSet<T>, which among other advantages does not allow duplicate entries.
  • Lazy Loading on by Default in new Models: When you create a new model in VS 2010, you get generated ObjectContext types that have lazy loading turned on by default (context.ContextOptions.LazyLoadingEnabled = true is placed in the constructor). This simplifies the default experience of working with objects. Of course, it is still possible to turn it off and do explicit and eager loading.
  • EntityDataSource support for Query Extenders and POCO: EntityDataSource now includes support for ASP.NET Query Extenders and POCO entities. Query Extenders are a new addition to ASP.NET that allow you to have more control over the data retrieval query of a Data Source, leveraging the LINQ capabilities of Entity Framework.
  • Support for Binary Keys: The EF now allows you to have binary property types (and varbinary storage columns) mapped as Entity Key / Foreign Key.
  • ObjectMaterialized event: It is now possible to write logic that is executed immediately after an object has been materialized. This event is raised after the scalar, complex and reference properties are populated (collections are filled afterwards).
  • Object Services API improvements to enable N-Tier and Self Tracking Entities: ObjectStateEntry.GetUpdatableOriginalValues method provides a access to an updatable data record that you can use to establish the original state of an entity at the property level.
  • Improvements to the generated SQL: Numerous simplifications and improvements of the SQL generated when querying using the Entity Framework have been done including: removal of joins, better translation of certain functions,  elimination of constants used for internal purposes, which results in removing of levels of nesting and others.
  • Navigation Property Management: Users can now delete and add navigation properties, enabling the creation of one-way associations.
  • Improved Database Generation: SQL CE support has been added. In addition, customization of database generation is significantly simpler now, with the ability to specify the DDL generation template to be used, as well as automatic discovery of installed database generation workflows and templates.
  • New Extensibility APIs: New APIs enable users to add custom properties to any object in the model and have those properties show up in the property sheet. In addition, other extension points allow for customization of models on load, save, and after the model creation and update wizards run.
  • Generation of Complex Types from Stored Procedures: When creating a function import from a function, the UI can now detect the columns returned from a stored procedure and create a corresponding complex type. In addition, existing complex types can be updated when a stored procedure definition changes.
  • Greatly Improved Facet Management: The designer can now distinguish between empty and blank values, and various property facet defaults are handled more cleanly and consistently.
  • LINQ to Entities improvements: Support for recognizing additional patterns in queries, simplification of EntityFunctions and SqlFunctions static classes and OrderBy is now lifted over filters and other operations.

ADO.NET Data Services 4 Beta 2

  • Projections: This ADO.NET Data Services URI format has been extended to express projections (i.e. you can now work with a subset of the properties of an entity).  Beta 2 includes both server and client library (including LINQ support) support for projections.   
  • Data Binding:  The data services client library for the .NET Framework 3.5 SP1 and Silverlight2 has been extended to support two-way data binding for WPF and Silverlight based applications. 
  • Row Count: One scenario we heard a ton of feedback on after shipping V1 of ADO.NET Data Services in the .NET Framework 3.5SP1 is the ability for the a client of a data service to determine the total number of entities in a set without having to retrieve them all.  To address this need, we have extended the data services addressing scheme to allow a client to obtain this type of information without having to download all the entities in a set.
  • Feed Customization (aka "Web Friendly Feeds") : A common ask we have received is to provide the ability to customize how entities are mapped into the various elements of an AtomPub feed.  This feature does just that by providing a data service author declarative control over how the data service runtime maps the properties of an entity (e.g. a Customer, Order, etc) to the elements of a feed.
  • Server Driven Paging (SDP) : This one is best described by example.  If you had a data service that exposes photos, you likely want to limit the total number of photos a single request to the service can retrieve because the total collection of photos may be very large.  This feature allows a service author to set per collection limits on the total number of entities returned for each request.  In addition to limiting the number of photos returned per request, the server provides the client a "next link" which is simply a URI specifying how to continue retrieving the rest of the entities in the collection not returned by the first request.  For those familiar with AtomPub, this feature adds support for AtomPub <link rel="next" ...> elements to the data service runtime.  
  • Enhanced BLOB Support: This feature enhances the BLOB support provided in V1 to enable data services to stream arbitrarily large BLOBs, store binary content separate from its metadata, easily defer the loading of BLOB content when its metadata is requested, etc. 
  • Request Pipeline: We have started to expose events throughout the data services server request processing pipeline.  For this release we’ll expose request level events and in future we’ll look to expose more fine grained events based on your feedback.  The goal of exposing our processing pipeline is to allow services further transparency into a data service such that a service author can do things such as setting HTTP response cache headers, wrapping interceptor processing and data service request processing in a single transaction, etc.   
  • New "Data Service Provider" Interface for Custom Provider Writers: As the data services runtime has evolved, so has the number of ways people want to plug data into the data service framework.  In V1, two methods (Entity Framework and arbitrary .NET classes) were supported to enable a data service to interact with various diverse data sources.  To address another class of environments and data sources we have introduced a way to write a "custom" provider for those cases when the previous two provider models don't meet your needs.

Thank you,

Elisa Flasko
Program Manager,
Data & Modeling Group

Comments

  • Anonymous
    October 19, 2009
    Is Entity Framework Feature CTP inside this beta 2?

  • Anonymous
    October 19, 2009
    My question is the same as Wirlo. If I install Beta 2 I will have access to all features installed with EF Feature CTP 1? Sorry, but the upgrade path and the roadmap isn't clear.

  • Anonymous
    October 20, 2009
    I uninstalled the Feature CTP 1 before installing Beta 2. I was glad and surprised to still find the SelfTracking Code Generation Item available from within VS BUT then I realized that it had been left over by the uninstallation and is NOT part of the Beta 2, it referes to Microsoft.Data.Entity.CTP. I'm now gonna reinstall the Feature CTP but I'm afraid it won't be compatible with Beta 2. I agree with Luciano Moreira, a clarification on the roadmap would be appriciated. Will there be a Feature CTP 2 soon?

  • Anonymous
    October 20, 2009
    I can't reinstall the Feature CTP! A message pops up "This application requires .NET Framework 4.0 Client Profile Beta 1. Please install the .NET Framework then run this installer again." I uninstalled all of the Beta1 stuff before installing Beta2. What's the plan EF folks?

  • Anonymous
    October 21, 2009
    Will the latest release support Sql Server 2008 spatial types like SqlGeography?

  • Anonymous
    October 22, 2009
    I Have the same question as Wirlo and Luciano, where are the features of CTP1 in Beta 2? I am manly interested on the Self Tracking Entity functionality! Please help!!!

  • Anonymous
    October 22, 2009
    I'm also a bit disappointed about the absence of the above mentioned features. Any clarification would be very appreciated!!

  • Anonymous
    October 22, 2009
    Should we continue our developements with this feature? If so, right click on solution, click build solution and publish it for us please!! I'm hungry!

  • Anonymous
    October 23, 2009
    The comment has been removed

  • Anonymous
    October 23, 2009
    I have installed the VS2010 Beta 2. But the EF4 CTP1 not worling.

  • Anonymous
    October 25, 2009
    I had install VS2010 beta2, but when i try to add a new EDMX file in a new C# class liberay project (fwk 4.0), the error message 'object reference not set to an instance of an object' appear. How?

  • Anonymous
    October 25, 2009
    I've post a suggestion at the Microsoft Connect https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=503514 asking for the T4 templates for n-tier support and some clarificaton on the subject. The suggestion title is: Missing T4 Templates for N-Tier support with Entity Framework

  • Anonymous
    October 26, 2009
    EF Feature CTP 1 installs on top of Beta 1. EF Feature CTP 2, which will be released soon by the team will install on top of EF Beta 2. Also CTP 1 must be uninstalled before installing CTP 2. Hope that helps.

  • Anonymous
    October 28, 2009
    From the sugestion I've mentioned above, this was the answer I got from MS: "Posted by Microsoft on 10/28/2009 at 2:06 PM Hello Nelson and others, Thanks for taking the time to provide your feedback to the team. As stated in the original announcement for the Entity Framework Feature CTP 1 (see http://blogs.msdn.com/adonet/archive/2009/06/22/announcing-entity-framework-feature-ctp-1.aspx), the features included in the Feature CTP were never scheduled to be part of .NET 4.0 and Visual Studio 2010. Of course we will do whatever is in our hands to make these features available to customers as soon as possible. Regarding support for Beta 2, as we announced yesterday (see http://blogs.msdn.com/adonet/archive/2009/10/26/upcoming-ado-net-entity-framework-feature-community-technology-preview-for-visual-studio-2010-beta-2.aspx), we are now working on finishing the Feature CTP 2, which will contain new versions of the Self-Tracking Entities template and Code-Only and will work on top of Beta 2 (note: an updated POCO template will not be included in the Feature CTP 2 but will be released at a later date). Thanks, Diego Vega - Entity Framework Team" This answer is something we use to say here in Portugal like a "nim", wich is a simultaneous "yes" and "no". So let's see, "yes" there will be a CTP2 to work with the Beta 2, and "no" this is not scheduled to ship with the final version. And the statement "Of course we will do whatever is in our hands to make these features available to customers as soon as possible" is like, don't worry invest your time with the EF that we'll ship with .NET 4, because some day you'll get N-Tier support, etc., etc. Is this the best answer? In my opinion, it's not. The ADO.NET Team should really clarify if this functionality will be released with the .NET 4 (apparently it won't), and if not, what can we expect and with what timings. N-Tier support is a must to EF, from this post comments it's clear that no one was expecting that the EF Features were not scheduled to be part of the final version.

  • Anonymous
    November 01, 2009
    The comment has been removed

  • Anonymous
    November 15, 2009
    I read the new features of this version of VS2010. I was expecting to have ASP.Net MVC framework v2 with this version of VS2010. Would someone brifeing about the future of ASP.Net MVC framework in Web development world. Is it dead? Thanks Mahabub Sikder Sr. Software Engineer Orion Informatics Ltd Dhaka, Bangladesh

  • Anonymous
    November 19, 2009
    Has the limitation on 'historical debugging' only running on 32-bit versions .. been fixed. Is beta 2 fully functional on Windows 2008 R2??

  • Anonymous
    November 26, 2009
    ..no mohol by si to kludne pisat aj po cesky clovece ;-)!  diky, pekne si to zosumarizoval

  • Anonymous
    November 27, 2009
    I am running Win7 x64 with VS2010 Beta 2 Ultimate. I have no ADO.NET Entity project types or templates available. I went to the link above to install the CTP 2 (http://blogs.msdn.com/adonet/archive/2009/10/26/upcoming-ado-net-entity-framework-feature-community-technology-preview-for-visual-studio-2010-beta-2.aspx) And I still have nothing! What gives?

  • Anonymous
    December 01, 2009
    Does Entity Framework suports the HierarchyID data type of sql server 2008?

  • Anonymous
    December 01, 2009
    hey do read this...i really found it useful also http://catchitnews.blogspot.com/2009/11/major-features-of-visual-studio-2010.html