The project I'm working uses SMO to restore the needed databases as part of the application installer. The problem is, on a machine that has never had the application installed.
From the event logs, it seems like the database can't be restored because it doesn't exist in the instance. (Due to the fresh install)
Can I use SMO to restore the database to an instance where it doesn't already exist? Is there a best practice for installing databases this way?