Ejemplo n.º 1
0
        /// <summary>
        /// Overrides the specified server.
        /// </summary>
        /// <param name="server">The server.</param>
        /// <param name="database">The database.</param>
        /// <param name="username">The username.</param>
        /// <param name="password">The password.</param>
        /// <returns></returns>
        public static DatabaseOverride Override(string server, string database, string username, string password)
        {
            if (string.IsNullOrEmpty(username))
            {
                return(Override(server, database));
            }

            NetworkCredential credential = CredentialHelper.ConvertToNetworkCredential(username, password);

            DatabaseInfo databaseSettings = new SqlDatabaseInfo(server, database, DatabaseAuthentication.Integrated, credential);

            return(Override(databaseSettings));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Overrides the specified server.
        /// </summary>
        /// <param name="server">The server.</param>
        /// <param name="database">The database.</param>
        /// <returns></returns>
        public static DatabaseOverride Override(string server, string database)
        {
            DatabaseInfo databaseSettings = new SqlDatabaseInfo(server, database);

            return(Override(databaseSettings));
        }