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); } }
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); } }