
namespace SilverlightGridHierarchyUsingMVVMAndServices.Web
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Web.Ria;
    using System.Web.Ria.Data;
    using System.Web.DomainServices;
    using System.Data.Linq;
    using System.Web.DomainServices.LinqToSql;


    // Implements application logic using the NorthwindDataContext context.
    // TODO: Add your application logic to these methods or in additional methods.
    [EnableClientAccess()]
    public class NorthwindDomainService : LinqToSqlDomainService<NorthwindDataContext>
    {

        // TODO: Consider
        // 1. Adding parameters to this method and constraining returned results, and/or
        // 2. Adding query methods taking different parameters.
        public IQueryable<Customer> GetCustomers()
        {
            return this.Context.Customers;
        }

        // TODO: Consider
        // 1. Adding parameters to this method and constraining returned results, and/or
        // 2. Adding query methods taking different parameters.
        public IQueryable<Order> GetOrders()
        {
            return this.Context.Orders;
        }

        // TODO: Consider
        // 1. Adding parameters to this method and constraining returned results, and/or
        // 2. Adding query methods taking different parameters.
        public IQueryable<Order_Detail> GetOrder_Details()
        {
            return this.Context.Order_Details;
        }
    }
}


