Persistence

NBuilder also has another method called Persist(). It does the same thing as Build() but once the objects have been built it will call a predefined method to persist the objects somewhere.

The first thing you need to do is tell NBuilder how to persist objects of a certain type. You do this with the BuilderSetup class. (You can read more about BuilderSetup in the configuration section).

You only need to do this once per test run. Once this is done you simply call Persist() instead.