blog.easyciel.net author="Patrick Rabian" about="c#, sharepoint, biztalk, team system resources" more="news, samples, tips for .NET world's developers !"

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

Sunday, 6 July 2008 01:48 by prabian

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

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

March 10. 2010 09:40