// GET: api/CustomerService public CustomerGetListResult Get() { long fromCustomer = 0; long toCustomer = long.MaxValue; var range = Request.Headers.Range; if (range != null) { fromCustomer = range.Ranges.First().From.Value; toCustomer = range.Ranges.First().To.Value; } var customerList = CustomerTable.Skip((int)fromCustomer).Take((int)toCustomer - (int)fromCustomer + 1).ToList(); return(new CustomerGetListResult(Request, customerList, fromCustomer, fromCustomer + customerList.Count() - 1, CustomerTable.Count())); }