Ejemplo n.º 1
0
        public void Run()
        {
            var horses = _horseService.GetAllHorses();

            foreach (var horse in horses)
            {
                Console.WriteLine($"HorseName: {horse.Name}, Price:{horse.Price}");
            }

            Console.WriteLine("Enter any key to exit");
            Console.Read();
        }
Ejemplo n.º 2
0
 public IActionResult GetAllHorses(HorseRequest horseRequest)
 {
     _mainResponse = _horseService.GetAllHorses(horseRequest);
     _jsonString   = Mapper.Convert <GetAllHorses>(_mainResponse);
     return(new OkObjectResult(_jsonString));
 }