Пример #1
0
    protected virtual string CreateDatabase(DisconnectedMachineEntity machine)
    {
        DatabaseName databaseName = DatabaseName(machine);

        DisconnectedTools.DropIfExists(databaseName);

        string fileName    = DatabaseFileName(machine);
        string logFileName = DatabaseLogFileName(machine);

        DisconnectedTools.CreateDatabase(databaseName, fileName, logFileName);

        return(((SqlServerConnector)Connector.Current).ConnectionString.Replace(Connector.Current.DatabaseName(), databaseName.Name));
    }
Пример #2
0
 protected virtual void DropIfExists(DatabaseName databaseName)
 {
     DisconnectedTools.DropIfExists(databaseName);
 }