using System.Collections.Generic;
using _1_Model;
using Telerik.OpenAccess.Query;
using Telerik.OpenAccess; 

namespace _5A_WCFService
{
  public class Service1 : IService1
  {
    public List<Category> GetCategories()
    {
      var categories = 
        from category 
          in NorthwindProvider.ObjectScope().Extent<Category>()
          select category; 

      return categories.ToList(); 
    }

    //public List<Product> GetProducts(int categoryID)
    //{
    //  var products = 
    //    from product
    //    in NorthwindProvider.ObjectScope().Extent<Product>()
    //    where product.CategoryID == categoryID
    //                           select product;
    //  return products.ToList();   
    //}
  }
}
