예제 #1
0
 public HttpResponseMessage Get(string calendarYear, [ModelBinder(typeof(Ints))] IEnumerable <int> courseId = null)
 {
     try
     {
         var result = CoursePeriodBusiness.Get(calendarYear, courseId);
         return(Request.CreateResponse(HttpStatusCode.OK, result));
     }
     catch (Exception exc)
     {
         var logId = LogBusiness.Error(exc);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, new ErrorModel(logId)));
     }
 }
        public void CoursePeriodGetTest()
        {
            var actual = CoursePeriodBusiness.Get("2017", null);

            Assert.IsTrue(actual.Count() > 0);
        }