Using "Dynamic Data" with Entity Data model instead of Linq To Sql model

6. July 2008

Previous versions of "Dynamic Data" were designed to use "LinqToSql".
With this service pack beta, you can use it with "Entity Data".

The "Context" type that must be declared is now "ObjectContext" instead of "Datacontext".

After having installed...
- .NET Framework 3.5 SP1 Beta
- Visual Studio 2008 SP1 Beta
(can be download here for .NET and here for VS)



...you can create a new project "Dynamic Data Entities Web Application".



Then you just have to :
- Create an "ADO.NET Entity Data Model" (for instance with the context class named "MyModelEntities") and insert one or more tables.



- Uncomment and change the specific line in "Global.asax.cs" :

model.RegisterContext(typeof(MyModelEntities), new ContextConfiguration() { ScaffoldAllTables = true });

- Launch the project

.NET Projects, Asp.net, DAL, Developer Tools , , ,

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading