コード例 #1
0
 public async Task<IHttpActionResult> Delete(CollegeKpiView view)
 {
     var result = _service.GetRecordResult(view);
     if (result == null) return BadRequest("The test record does not exist!");
     await _service.Delete(result);
     return Ok();
 }
コード例 #2
0
 public CollegeKpi GetRecordResult(CollegeKpiView view)
 {
     var college = _collegeRepository.GetByName(view.CollegeName);
     if (college == null) return null;
     var time = view.TestTime;
     return _repository.GetByCollegeIdAndTime(college.Id, time);
 }