public InvLib.CustomerList Fetch() { var item = new InvLib.CustomerList(); base.SetIsReadOnly(item, false); var wd = from r in MockDb.CustomerData join l in MockDb.LocationData on r.LocationId equals l.Id select new { Id = r.Id, Name = r.Name, Lat = l.Lat, Long = l.Long }; foreach (var p in wd) { var oc = (from o in MockDb.OrderData where o.CustomerId == p.Id select o).Count(); item.Add(MakeChild(p.Id, p.Name, p.Lat, p.Long, oc)); } base.SetIsReadOnly(item, true); return item; }
public InvLib.CustomerList Fetch() { var item = new InvLib.CustomerList(); base.SetIsReadOnly(item, false); var wd = from r in MockDb.CustomerData join l in MockDb.LocationData on r.LocationId equals l.Id select new { Id = r.Id, Name = r.Name, Lat = l.Lat, Long = l.Long }; foreach (var p in wd) { var oc = (from o in MockDb.OrderData where o.CustomerId == p.Id select o).Count(); item.Add(MakeChild(p.Id, p.Name, p.Lat, p.Long, oc)); } base.SetIsReadOnly(item, true); return(item); }