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

            var model = _horseDetailMapper.Map(horse);

            return(View(model));
        }
Esempio n. 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));
        }