public AggregateFlowView Get(string collegeName, DateTime begin, DateTime end) { var college = _collegeService.QueryInfo(collegeName); if (college == null) { return(null); } var stats = _townFlowService.QueryTownFlowViews(begin, end, college.Id, FrequencyBandType.College); var result = stats.Any() ? stats.ArraySum().MapTo <AggregateFlowView>() : new AggregateFlowView(); result.Name = collegeName; return(result); }
public IHttpActionResult Get(string name) { var info = _service.QueryInfo(name); return(info == null ? (IHttpActionResult)BadRequest("College Name Not Found!") : Ok(info)); }
public IEnumerable <CollegeYearView> GetById(int id) { return(_service.QueryInfo(id)); }
public CollegeView GetByName(string name) { return(_service.QueryInfo(name)); }
public IHttpActionResult Get(int id) { var info = _service.QueryInfo(id); return(info == null ? (IHttpActionResult)BadRequest("College Id Not Found!") : Ok(info)); }