public static QueryPageModel <ShopBranch> GetShopBranchsAll(ShopBranchQuery query) { var shopBranchInfos = _shopBranchService.GetShopBranchsAll(query); QueryPageModel <ShopBranch> shopBranchs = new QueryPageModel <ShopBranch> { Models = shopBranchInfos.Models.Select(e => new ShopBranch { AddressDetail = e.AddressDetail, ContactPhone = e.ContactPhone, Id = e.Id, ShopBranchName = e.ShopBranchName, Status = e.Status, DistanceUnit = e.Distance >= 1 ? e.Distance + "KM" : e.Distance * 1000 + "M", Distance = e.Distance, ServeRadius = TypeHelper.ObjectToInt(e.ServeRadius), Latitude = e.Latitude.HasValue ? e.Latitude.Value : 0, Longitude = e.Longitude.HasValue ? e.Longitude.Value : 0, AddressPath = e.AddressPath }).ToList() }; return(shopBranchs); }