public void Test2() { var cont = new ProductCatalogContainer(new Uri(@"http://localhost:2691/ProductCatalog.svc/")); var infos = cont.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public). Where( x => x.PropertyType.IsGenericType && x.PropertyType.GetGenericArguments().FirstOrDefault(t => t == typeof(ProductDetailViewModel)) != null). First(); }
public void Test() { var cont = new ProductCatalogContainer(new Uri(@"http://localhost:2691/ProductCatalog.svc/")); var @descending = cont.ProductDetailViewModels.OrderByDescending(x => x.Description).Take(3); foreach (var list in @descending.ToList()) { Console.WriteLine(list.Description); } }
public Repository() { _container = new ProductCatalogContainer(new Uri(@"http://localhost:2691/ProductCatalog.svc/")); }