After declaring and compiling your domain (i.e.
your domain object classes), you use dbschema.exe
to derive an sql-script from it. This sql-script in
turn sets up your database for persisting instances
of the domain object classes.
The canonical way to develop a re-motion application
is to have
- a domain project with all the domain object classes
- a sample project or test project for exercising those domain object classes,
typically a console application
- (eventually, you will also have a web project, but this is beyond the
scope of this page)
This is called the canonical project structure. If you have
not read the page canonical project structure yet, please
do so. The following explanation will assume the
canonical project structure.
If you have a sample project that will use the domain
object classes, you can use the application's
(App.config) for telling
dbschema.exe what the
name of the database is. If you don't specify an
dbschema.exe will generate a
USE DatabaseName –
for first experiments this is easy to fix manually, of course.