コード例 #1
0
        private string GetDataSource()
        {
            string connectionString = UserIdentity.GetConnectionString();

            if (!string.IsNullOrEmpty(connectionString))
            {
                var sqlConnectionStringBuilder = new SqlConnectionStringBuilder(connectionString);
                return(sqlConnectionStringBuilder.DataSource);
            }

            return(string.Empty);
        }