public void Dispose() { if (_server != null) { _server.Dispose(); } _server = null; _database = null; }
private void Initialize(SQL2008Server server, string databaseName) { if (server == null) { throw new ArgumentNullException("server"); } if (string.IsNullOrEmpty(databaseName)) { throw new ArgumentNullException("databaseName"); } _server = server; if (!_server.ContainsDatabase(databaseName)) { throw new ApplicationException("The database '" + "' is not present in the database."); } DatabaseName = databaseName; //_database = new Database( _server.Server, databaseName ); _database = _server.Server.Databases[DatabaseName]; }
public SQL2008Database(SQL2008Server server, string databaseName) { Initialize(server, databaseName); }