Question

I am upgrading from EF5 to EF6 and for that I am using the newly released EntityDataSource control http://blogs.msdn.com/b/webdev/archive/2014/02/28/announcing-the-release-of-dynamic-data-provider-and-entitydatasource-control-for-entity-framework-6.aspx in my web application.

The problem I am facing with this is that on changing the entity datasource control to :

<ef:EntityDataSourceID="GridDataSource"runat="server"EnableDelete="true"/>

All the events are taking incorrect old namespace "System.web.UI.WebControls" instead of correct namespace "Microsoft.AspNet.EntityDataSource".

There are numerous places where I've to edit this, but I think it should be automatically handled by the control.

Can anyone help me whats wrong with this?

Was it helpful?

Solution

Reference the namespaces with a using directive like this:

using EntityDataSource = Microsoft.AspNet.EntityDataSource.EntityDataSource;
using EntityDataSourceSelectingEventArgs = Microsoft.AspNet.EntityDataSource.EntityDataSourceSelectingEventArgs;
using EntityDataSourceChangingEventArgs = Microsoft.AspNet.EntityDataSource.EntityDataSourceChangingEventArgs;
using EntityDataSourceChangedEventArgs = Microsoft.AspNet.EntityDataSource.EntityDataSourceChangedEventArgs;
using EntityDataSourceContextCreatingEventArgs = Microsoft.AspNet.EntityDataSource.EntityDataSourceContextCreatingEventArgs;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top