/// <summary> /// 查询小区价格趋势 /// </summary> /// <returns>小区价格趋势,总页数</returns> public IEnumerable<object> Get() { int totalPage = 0; List<NeighborhoodPriceTrend> result = new List<NeighborhoodPriceTrend>(); var queryString = Request.GetQueryNameValuePairs(); var queryConditions = new NeighborhoodPriceTrendQueryConditions(); queryConditions.GetValues(queryString); NeighborhoodPriceTrendFunction neighborhoodPriceTrendFunction = new NeighborhoodPriceTrendFunction(); neighborhoodPriceTrendFunction.QueryNeighborhoodPriceTrend(queryConditions, out result, out totalPage); List<object> objectResult = new List<object>() { result, new { totalPage = totalPage } }; return objectResult; }
//查询小区价格趋势 public int QueryNeighborhoodPriceTrend(NeighborhoodPriceTrendQueryConditions queryConditions, out List<NeighborhoodPriceTrend> result, out int totalPage) { using (var db = new HouseMarketEntities()) { totalPage = 0; var entities = db.NeighborhoodPriceTrends; var query = SetQuery(entities, queryConditions, out totalPage); result = query.ToList(); return 0; } }
/// <summary> /// 查询单个小区价格趋势 /// </summary> /// <param name="neighborhood">小区</param> /// <returns>小区价格趋势,总页数</returns> public IEnumerable<object> Get(string neighborhood) { int totalPage = 0; List<NeighborhoodPriceTrend> result = new List<NeighborhoodPriceTrend>(); var queryConditions = new NeighborhoodPriceTrendQueryConditions() { Neighborhood = neighborhood }; NeighborhoodPriceTrendFunction neighborhoodPriceTrendFunction = new NeighborhoodPriceTrendFunction(); neighborhoodPriceTrendFunction.QueryNeighborhoodPriceTrend(queryConditions, out result, out totalPage); List<object> objectResult = new List<object>() { result, new { totalPage = totalPage } }; return objectResult; }