WebMethod syntax
this is my code

  OrderDataRepository rep = new OrderDataRepository();

        var results = rep.GetAllOrderData().Where(x => x.POD_DATE == xxxxxx).
                      GroupBy(o => o.User).
                      Select(g =>
                                new
                                {
                                    DriverId = g.Key.Id,
                                    DriverName = g.Key.Name,
                                    OrderCount = g.Count(),
                                    OrderCountWhereNameIsNotNull = 
                                                      g.Count(o => o.RECEIVE_NAME != null)
                                }).ToList();

i need to convert it to a WebMethod function wich will recieve xxxxx

here is an example of a webmethod:

       [WebMethod]
            public IList<FieldDTO> GetFields()
            {
                try
                {
                    FieldRepository rep = new FieldRepository();
                    return rep.Get().Select(x => new FieldDTO(x)).ToList();
                }
                catch (Exception e)
                {
                    throw WrapException(e);
                }
            }

WebMethod syntax
===

this is my code

  OrderDataRepository rep = new OrderDataRepository();

        var results = rep.GetAllOrderData().Where(x => x.POD_DATE == xxxxxx).
                      GroupBy(o => o.User).
                      Select(g =>
                                new
                                {
                                    DriverId = g.Key.Id,
                                    DriverName = g.Key.Name,
                                    OrderCount = g.Count(),
                                    OrderCountWhereNameIsNotNull = 
                                                      g.Count(o => o.RECEIVE_NAME != null)
                                }).ToList();

i need to convert it to a WebMethod function wich will recieve xxxxx

here is an example of a webmethod:

       [WebMethod]
            public IList<FieldDTO> GetFields()
            {
                try
                {
                    FieldRepository rep = new FieldRepository();
                    return rep.Get().Select(x => new FieldDTO(x)).ToList();
                }
                catch (Exception e)
                {
                    throw WrapException(e);
                }
            }
