public IHttpActionResult GetStudentByById(long id) { try { Student student = new Student(); student = studentFcd.GetById(id); if (student == null) { return(NotFound()); } return(Ok(student)); } catch (Exception ex) { log.Error($"{ex.Message}"); throw ex; } }
public void GetById_Jane() { var detail = _facadeSUT.GetById(Seed.StudentJane.Id); Assert.Equal(detail, _mapper.Map(Seed.StudentJane)); }
public void GetById_Jane() { var detail = _facadeSUT.GetById(Seed.StudentJane.Id); Assert.Equal(detail, _mapper.Map(Seed.StudentJane), StudentDetailModel.StudentDetailModelComparer); }