Example #1
0
 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));
        }
Example #3
0
        public void GetById_Jane()
        {
            var detail = _facadeSUT.GetById(Seed.StudentJane.Id);

            Assert.Equal(detail, _mapper.Map(Seed.StudentJane), StudentDetailModel.StudentDetailModelComparer);
        }