ascending--升序
descending--降序
--案例
var model2 = from a in db.BaseBranch
where a.GFBranchId == _userInfo.ProjectId
orderby a.CreatedDate descending--ascending
//var model1 = model.
select new
{
Id = a.Id,
CustomerName = a.AtmCustomer == null ? null : a.AtmCustomer.Name,
GFBranchName = cityname,//Branch
BranchID = a.Code,
LocationName = a.ShopName,
gpsconfirm = a.gpsconfirm,
GPScoordinate = a.Latitude + "," + a.Longitude,//GPS:横+纵
CreatedDate = a.CreatedDate,
Customerid=a.AtmCustomer.Id,
cityid=city.Id
};