Пример #1
0
        internal void Validate()
        {
            if (!string.IsNullOrWhiteSpace(ConnectionStringName) &&
                !string.IsNullOrWhiteSpace(ConnectionString))
            {
                throw Error.AmbiguousConnectionString();
            }

            if (string.IsNullOrWhiteSpace(ConnectionString)
                != string.IsNullOrWhiteSpace(ConnectionProviderName))
            {
                throw Error.MissingConnectionInfo();
            }
        }