/// <summary> /// 查询地区价格趋势 /// </summary> /// <returns>地区价格趋势,总页数</returns> public IEnumerable<object> Get() { int totalPage = 0; List<AreaPriceTrend> result = new List<AreaPriceTrend>(); var queryString = Request.GetQueryNameValuePairs(); var queryConditions = new AreaPriceTrendQueryConditions(); queryConditions.GetValues(queryString); AreaPriceTrendFunction areaPriceTrendFunction = new AreaPriceTrendFunction(); areaPriceTrendFunction.QueryAreaPriceTrend(queryConditions, out result, out totalPage); List<object> objectResult = new List<object>() { result, new { totalPage = totalPage } }; return objectResult; }
//查询地区价格趋势 public int QueryAreaPriceTrend(AreaPriceTrendQueryConditions queryConditions, out List<AreaPriceTrend> result,out int totalPage) { using (var db = new HouseMarketEntities()) { totalPage = 0; var entities = db.AreaPriceTrends; var query = SetQuery(entities, queryConditions, out totalPage); result = query.ToList(); return 0; } }
/// <summary> /// 查询单个地区价格趋势 /// </summary> /// <param name="area">地区</param> /// <returns>地区价格趋势,总页数</returns> public IEnumerable<object> Get(string area) { int totalPage = 0; List<AreaPriceTrend> result = new List<AreaPriceTrend>(); var queryConditions = new AreaPriceTrendQueryConditions() { Area = area }; AreaPriceTrendFunction areaPriceTrendFunction = new AreaPriceTrendFunction(); areaPriceTrendFunction.QueryAreaPriceTrend(queryConditions, out result, out totalPage); List<object> objectResult = new List<object>() { result, new { totalPage = totalPage } }; return objectResult; }