示例#1
0
 public void ItExists()
 {
     // Arrange
     // Act
     // Assert
     Assert.IsNotNull(_horseService.Get(1));
 }
示例#2
0
        public ActionResult Horse(int id)
        {
            var horse = _horseService.Get(id);

            var model = _horseDetailMapper.Map(horse);

            return(View(model));
        }
示例#3
0
        public ActionResult Detail(int id)
        {
            var horse = _horseService.Get(id);

            var model = _horseDetailMapper.Map(horse);

            ViewBag.Message = "Default";

            return(View("Detail", model));
        }
        public IActionResult Get(int id)
        {
            var horse = _horseService.Get(id);

            if (horse == null)
            {
                return(NotFound("Horse Not Found"));
            }

            return(Ok(horse));
        }