Monday, July 19, 2010 2:27 PM Vimpyboy

Code-First with Entity Framework 4 and ASP.NET Web Pages

Scott Guthrie and Scott Hanselman have written great blog posts about how to use the new Code-First functionality in the latest Entity Framework CTP. But what about ASP.NET Web Pages?

Entity Framework 4 requires .NET 4.0, and since ASP.NET Web Pages is built on .NET 4.0 it should work, and it does! ASP.NET Web Pages is just not classic ASP on steroids, it´s the full .NET 4.0 made simple. Smile

I posted the code you need and how to do it as an answer on the ASP.NET Forums here:

http://forums.asp.net/t/1580303.aspx

When the database is generated, you can edit the data in the built-in database manager in WebMatrix.

Filed under: , ,

Comments

# Twitter Trackbacks for Code-First with Entity Framework 4 and ASP.NET Web Pages - Mikael S??derstr??m [asp.net] on Topsy.com

Pingback from  Twitter Trackbacks for                 Code-First with Entity Framework 4 and ASP.NET Web Pages - Mikael S??derstr??m         [asp.net]        on Topsy.com

# re: Code-First with Entity Framework 4 and ASP.NET Web Pages

Tuesday, October 12, 2010 3:46 AM by zigomir

Hi Mikael!

Since WebMatrix Beta 2 release RecreateDatabaseIfModelChanges isn't working anymore :/ There's no immediate changes in DB file when I change model classes.

Do you know what can I do about it?

Thanks in advance!

# re: Code-First with Entity Framework 4 and ASP.NET Web Pages

Tuesday, October 12, 2010 6:45 AM by zigomir

I solved a problem with installing SQL Server CE 4.0 CTP1 over CTP2 which was installed during WebMatrix Beta 2 release. Weird stuff.

Leave a Comment

(required) 
(required) 
(optional)
(required)