This is the third post of a series started with this post about a MonoRail and ActiveRecord tutorial.

There are several approaches for writing the domain model classes for a MonoRail and ActiveRecord application:

  • Create the domain model classes from a generator, providing a database schema
  • Create the domain model classes from scratch

Consequently, if you have chosen to create the domain model classes from scratch, after you have created the domain model classes you can auto-generate the database schema.
If instead you have already the database schema, you could opt for the first point (and maybe retouch them after the generation).

For the aims of this tutorial, we will first write the domain model classes and then auto-generate the database schema.

These are the domain model classes: copy and paste them under the model folder (once again this is a convention, you can add them in a different place):

Read more