我正在尝试将一些数据粘贴到应用程序中,这样我就可以构建一个公共字符串 get + linq 查询,以便在我需要它们时只提取我想要的位。
我只是在努力存储它,然后我将如何将它拉回来以便我可以查询它......
public void CommonDatatoApp()
{
CDataResponse cCommonData = this.GatewayReference.GetCommonData();
var dCountries = cCommonData.PropertyCountries; //KeyValue
var dRegions = cCommonData.Regions; //Array
var dAreas = cCommonData.Areas; //Array
var dResorts = cCommonData.Resorts; //Array
var commonRAR = (from c in dCountries
join r in dRegions on c.Key equals r.CountryCd
join a in dAreas on r.Id equals a.RegionId
select new { c.Key, c.Value, r.Id, r.Name, dAreasID = a.Id, dAreasIDName = a.Name}
);
HttpContext.Current.Application["commonData"] = commonRAR;
}