C# Class UnitTests.Subtext.DatabaseHelper

Exibir arquivo Open project: ayende/Subtext

Public Methods

Method Description
CreateAndInstallDatabase ( ConnectionString connectionString, string databaseName, string directory ) : void
CreateDatabase ( string serverName, string databaseName, string directory ) : void
DeleteDatabase ( string serverName, string databaseName, string directory ) : void
DeleteDatabaseFiles ( string databaseName, string directory ) : void
InstallDatabase ( string connectionString ) : void

Private Methods

Method Description
CreateDb ( Server server, string databaseName, string directory ) : Database
CreateLogin ( Server server, NamedSmoObject db, string loginName ) : void
CreateSqlLoginForCurrentUser ( Server server, NamedSmoObject db, IIdentity identity ) : void
CreateSqlUserForCurrentUser ( Database db, IIdentity currentIdentity ) : void
CreateSqlUsersGroup ( Server server, Database db ) : void
CreateUser ( Database db, string login, string userName ) : void
DeleteFile ( string path ) : void
DetachDatabase ( string serverName, string databaseName ) : void
FindUserByLogin ( Database db, string login ) : User

Method Details

CreateAndInstallDatabase() public static method

public static CreateAndInstallDatabase ( ConnectionString connectionString, string databaseName, string directory ) : void
connectionString Subtext.Scripting.ConnectionString
databaseName string
directory string
return void

CreateDatabase() public static method

public static CreateDatabase ( string serverName, string databaseName, string directory ) : void
serverName string
databaseName string
directory string
return void

DeleteDatabase() public static method

public static DeleteDatabase ( string serverName, string databaseName, string directory ) : void
serverName string
databaseName string
directory string
return void

DeleteDatabaseFiles() public static method

public static DeleteDatabaseFiles ( string databaseName, string directory ) : void
databaseName string
directory string
return void

InstallDatabase() public static method

public static InstallDatabase ( string connectionString ) : void
connectionString string
return void