In Entity-Framework, you can create a DB schema, and then generate your ORM classes. Is there any software that does this in reverse? For example you create a few classes that have relationships, and software generates a database schema with the relevant primary and foreign key relationships?
closed as off-topic by iterationx, GlenH7, Glenn Nelson, gnat, Doc Brown Dec 22 '13 at 19:26
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Questions about what language, technology, or project one should take up next are off topic on Programmers, as they can only attract subjective opinions for answers. There are too many individual factors behind the question to create answers that will have lasting value. You may be able to get help in The Whiteboard, our chat room." – iterationx, Doc Brown
- "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – GlenH7, Glenn Nelson, gnat
Yes, it is available in EF starting from version EF 4.1.
You can do it with Entity Framework, using Code First.
EF 4.3 even has Migrations built-in.
I've done this with DataNucleus/JDO, with Derby as the underlying database engine. It works, but you have to be ever so careful when doing it because effectively your classes are the schema and need to be subject to the usual level of carefulness with schema management.
I'm not sure I'd do it the same way again if I was starting out afresh.