示例#1
0
        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);
        }
示例#2
0
        public IHttpActionResult Get(string name)
        {
            var info = _service.QueryInfo(name);

            return(info == null ? (IHttpActionResult)BadRequest("College Name Not Found!") : Ok(info));
        }
示例#3
0
 public IEnumerable <CollegeYearView> GetById(int id)
 {
     return(_service.QueryInfo(id));
 }
示例#4
0
 public CollegeView GetByName(string name)
 {
     return(_service.QueryInfo(name));
 }
示例#5
0
        public IHttpActionResult Get(int id)
        {
            var info = _service.QueryInfo(id);

            return(info == null ? (IHttpActionResult)BadRequest("College Id Not Found!") : Ok(info));
        }