示例#1
0
        public IEnumerable <ViewProduct> GetProducts()
        {
            using (var db = new Entities2())
            {
                var results =
                    from p in (from p in db.Products select p).ToList()
                    select ViewProduct.FromProduct(p);

                return(results);
            }
        }
示例#2
0
        public IEnumerable <ViewProduct> GetProducts(string otherOptions)
        {
            using (var db = new MvvmSampleEntities())
            {
                var results =
                    from p in (from p in db.Products select p).ToList()
                    select ViewProduct.FromProduct(p);

                return(results);
            }
        }