Beispiel #1
0
        public async Task <IActionResult> GetSchoolYear(int id)
        {
            var grade = await gradeRepository.Get(id);

            if (grade == null)
            {
                return(NotFound(new { status = ResultStatus.STATUS_NOT_FOUND, message = "Không tìm thấy nghề nghiệp" }));
            }
            return(Ok(new { status = ResultStatus.STATUS_OK, data = grade }));
        }
Beispiel #2
0
 public Grade GetGrade(string id)
 {
     try
     {
         var grade = _repository.Get(id);
         return(grade);
     }
     catch (Exception)
     {
         return(new Grade());
     }
 }