Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate Entity Framework code without generating EDMX diagram

I currently generate XML from my single source of truth and save it as an Entity Framework EDMX file and then use the EntityClassGenerator object to create the classes from the diagram. Is there a way to generate the classes without having to create the XML file first?

like image 312
adam0101 Avatar asked Nov 29 '25 03:11

adam0101


1 Answers

I haven't heard back from Ladislav Mrnka, so I'll put his comment here as an answer. Using the Entity Framework's new Code-First, I can have a code-centric development workflow where my generator will create POCOs and a custom DbContext, then my database will be generated from the POCOs using convention instead of configuration. No need for an EDMX at all!

Here's a good explanation of it: http://weblogs.asp.net/scottgu/archive/2010/12/08/announcing-entity-framework-code-first-ctp5-release.aspx

like image 59
adam0101 Avatar answered Dec 02 '25 04:12

adam0101