What is ASP.NET
Dynamic Data?
Visual studio web
application/website project that generates code for CRUD operations [Create,
Read, Update, Delete] along with dynamic creation of UI for to display or edit
the database information. Clubbing entity framework and ASP.NET routing helps the dynamic data application to
create dynamic URLs for screens. This makes life easier for developers to
create a data driven website in few minutes without any hassles.
For more information
of ASP.NET Dynamic Data, please refer MSDN -
ASP.NET Dynamic Data
Blocker:
ASP.NET Dynamic Data
Entities web application project do not work with Entity framework 6.0 in
Visual studio 2013.
Issues:
- Missing namespaces
- Cannot convert lambda expression to type system.web.dynamicdata.modelproviders
- iobjectcontextadapter could not be found
- JavaScript runtime error: ASP.NET Ajax client-side framework failed to load.
Steps to cross the
hurdles and run the application successfully,
- Create a ASP.NET Dynamic Data Entities web application project
- Refer the Entity Framework 6.0 NuGet Package
- Search for EFProvider NuGet and refer the same
- Add the entity model and configure the database with entity model
- Add the below code snippet in Global.asax file in register routes method,
- DefaultModel.RegisterContext(new Microsoft.AspNet.DynamicData.ModelProviders.EFDataModelProvider(() => new TP_WORKINGEntities()),new ContextConfiguration {ScaffoldAllTables = true});
- Build and Run the application
- You may get JavaScript Runtime error if yes, Please add the below code snippet in Global.asax file in register routes method
- routes.Ignore("{resource}.axd/{*pathInfo}");
- Now ASP.NET Dynamic Data web application should run fine without any issues