14 Ekim 2011 Cuma

Sql Data Source Enumerator Extensions

Mevcut ağ üzerindeki tüm kullanılabilir SQL sunucu örnekleri bir liste halinde alan method örneği.

 public static IEnumerable<string> GetAvailableSqlServers(this SqlDataSourceEnumerator sqlDataSourceEnumerator)
        {
            return from row in SqlDataSourceEnumerator.Instance.GetDataSources().AsEnumerable()
                   orderby row.Field<string>("ServerName"), row.Field<string>("InstanceName")
                   select string.Concat(
                        row.Field<string>("ServerName"),
                        row.Field<string>("InstanceName") != string.Empty
                            ? string.Concat("\\", row.Field<string>("InstanceName"))
                            : string.Empty);
        }

1 yorum:

  1. As claimed by Stanford Medical, It is indeed the ONLY reason women in this country get to live 10 years more and weigh 19 kilos less than we do.

    (By the way, it is not about genetics or some secret exercise and really, EVERYTHING related to "HOW" they eat.)

    BTW, I said "HOW", and not "what"...

    TAP this link to find out if this easy test can help you find out your real weight loss potential

    YanıtlaSil