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

            var model = _horseDetailMapper.Map(horse);

            return(View(model));
        }
Ejemplo 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));
        }
Ejemplo n.º 4
0
        public IActionResult Get(int id)
        {
            var horse = _horseService.Get(id);

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

            return(Ok(horse));
        }