Use SQLMetal and the O/R Designer Together

Because SQLMetal's DBML intermediate file format shares the same XML schema as the Object Relational Designer's format, it is completely possible to use them together.

For example, you could generate a DBML intermediate file for a database using SQLMetal, and then load that file into the O/R Designer to tweak any entity class or entity class property names you desire. This approach provides a simple way to generate entity classes for an entire database, yet makes it simple to modify what you would like.

Another example where this interchangeability can be useful is for overriding the insert, update, and delete operations that are performed to make changes to the database for an entity class. You can generate the DBML intermediate file for your database with SQLMetal but then load the file into the designer and modify the insert, update, and delete methods, as was described in the section in this chapter about the Object Relational Designer.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset