Tuesday, March 5, 2013

Generate POCO classes from your Database

There is a great post about how to do this manually by Jon Galloway that you should checkout : http://weblogs.asp.net/jgalloway/archive/2011/02/24/generating-ef-code-first-model-classes-from-an-existing-database.aspx

 

However I just discovered a great tool to do this much more smoothly. Available as Entity Framework Power Tools which is a visual studio extension:

http://visualstudiogallery.msdn.microsoft.com/72a60b14-1581-4b9b-89f2-846072eff19d

 

Just right click on your project and select “Reverse Engineer Code First”

No comments:

Post a Comment