Multiple databases of the same type?

Oct 12, 2011 at 9:23 AM
Edited Oct 12, 2011 at 9:40 AM


I have a scenario where I have 1..n ViewModels in my Silverlight application.

Each VM has its own set of data collections that I need to load/save into a Sterling DB.  Ideally I would like to have a way of creating multiple databases of the same type.

It's not desired to have a common db for all of the VMs.

I tried to set the driver database name before calling .RegisterDatabase<>(); , but that didn't work.

I tried to set a unique basePath for every DB, but I just get error:

A database of type MyDatabase has already been created. Only one database may exist.

Is there a way to create multiple DBs of the same type?


Oct 12, 2011 at 11:11 AM

Not sure why you need them in a different database instead of in a collection keyed by VM ... but what you'll need to do is probably create a database based on the type of the VM. You can track the same type across multiple databases, the database just requires a unique name.