Your official information source from the .NET Web Development and Tools group at Microsoft.
Today, we are pleased to announce an update to ASP.NET DynamicData and EntityDataSource control, so that they work with Entity Framework 6.
- DynamicData provider for Entity Framework 6
- EntityDataSource control for Entity Framework 6
You can download this preview for ASP.NET DynamicData.EFProvider (http://www.nuget.org/packages/Microsoft.AspNet.DynamicData.EFProvider/) and EntityDataSource (http://www.nuget.org/packages/Microsoft.AspNet.EntityDataSource/) as preview NuGet packages from the NuGet gallery. You can install these pre-release packages through NuGet using the NuGet Package Manager Console, like this:
This package has a DynamicData EFProvider for EntityFramework 6. This provider can work with a Model (either Code First or Model First) which was created using Entity Framework 6. This package also installs the Page Templates, Entity Templates and Field Templates which are required for DynamicData. The templates have been updated to use Microsoft.AspNet.EntityDataSource control which we are also previewing today as well.
For more information on ASP.NET DynamicData please see http://msdn.microsoft.com/en-us/library/cc488545.aspx
Following are the steps for using this package in a ASP.NET DynamicData application:
This is an update to the EntityDataSource control which shipped in the .NET Framework. The EntityDataSource control has been updated to work with Entity Framework 6.
To use this control, please do the following
If you find any issues with this preview, please file issues at the EntityFramework CodePlex site https://entityframework.codeplex.com
Thank you for trying out the preview and helping us make it better.
C# only. Sure is frustrating for those of us who have spent 10yrs on vb.net.
Thanks a lot !!! I was needing this feature !!! :)
Good introduction on the update of .ASPNet.
Thanks a lot for the share.
Can we please have a better description of what this is and what the advantages are of using it. It appears to be a web forms control. If so, a screen shot would not go amiss.
Great Blog & Thanks for sharing this information..........
Awesome description I really really really LIKE IT!!! XD
I didn't understand a thing but the description is so great that I can understand it a-little!!! XD
How to install this preview:
"""You can download this preview for ASP.NET DynamicData.EFProvider (www.nuget.org/.../Microsoft.AspNet.DynamicData.EFProvider) and EntityDataSource (www.nuget.org/.../Microsoft.AspNet.EntityDataSource) as preview NuGet packages from the NuGet gallery. You can install these pre-release packages through NuGet using the NuGet Package Manager Console, like this:
Install-Package Microsoft.AspNet.DynamicData.EFProvider -Version 6.0.0-alpha1 –Pre
Install-Package Microsoft.AspNet.EntityDataSource -Version 6.0.0-alpha1 –Pre"""
Why can't I click the link...!? -.-
@Newbie Com Tech Boy, thanks, link added to the URLs.
@duped guy: ... and in all those 10yrs you didn't realize that VB.NET was created to be a transition language? Worse than that, do you see that much difference between both languages that you couldn't port the code between them?
I'm having a problem. Previously, I was using the following code to set the ObjectContext using the OnContextCreating event. Also, I was setting the CommandTimeout. Now it says it can't convert System.Data.Entity.Core.Objects.ObjectContext to System.Data.Objects.ObjectContext. The CommandTimeout property appears to no longer be there either.
protected void WorkUnitsEntityDataSource_ContextCreating(object sender, EntityDataSourceContextCreatingEventArgs e)
e.Context = ((IObjectContextAdapter)libraryContext).ObjectContext;
e.Context.CommandTimeout = 300;
The reason I was doing this is because EntityDataSource expected an ObjectContext, not a DbContext. I'm wondering if setting the context this way is still necessary? But, even if it isn't, I need to set the CommandTimeout for the context because the queries I'm executing are against large data sets.
I got it working. I didn't realize that you had to change the control to use ef: instead of asp:. You also need to specify the namespace for the EventArgs class. So, I guess the asp: one will be deprecated and removed at some point? Or will the ef: be renamed to asp: when the release comes out?
Unfortunately, the reason why I've been using the EntityDataSource control no longer seems to be working. When used with Telerik's RadGrid control, filtering would happen in the SQL server rather than the web server. It's now doing the filtering in the web server. I'm not sure if the issue is with Telerik's control or with the new EntityData Source control. I noticed that paging filtering is still working. This is important to me because I'm using the grid with some tables that have a lot of rows in them. Doing the filtering in the web server is inefficient and will cause an OutOfMemoryError.
Thank you. Seems to work well for a EF6 runtime datasource. Will future non alpha EntityDataSource versions support design time field retrieval?
@Jon can you please email me your issue at email@example.com so we can investigate.
@PKBubba the future version of the datasource will not support design time retrieval of fields.
We appreciate your support for Web Forms