Пример #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));
        }