Beispiel #1
0
        public IActionResult List()
        {
            IEnumerable <Workshop> allWorkshops = service.GetAllWorkshops();
            var workshopDtos = mapper.Map <IEnumerable <WorkshopDto> >(allWorkshops);

            return(View(workshopDtos));
        }
Beispiel #2
0
        public IActionResult List()
        {
            var allWorkshops = service.GetAllWorkshops();
            var model        = mapper.Map <IEnumerable <WorkshopDto> >(allWorkshops);

            return(View(model));
        }
Beispiel #3
0
        public IActionResult Index()
        {
            IEnumerable <Speakers>  allSpeakers  = speakerService.GetAllSpeakers();
            IEnumerable <Workshops> allWorkshops = workshopService.GetAllWorkshops();
            IEnumerable <Talks>     allTalks     = talkService.GetAllTalks();

            return(View(allSpeakers));
        }
        // GET: Editions
        public ActionResult Index()
        {
            IEnumerable <Speakers>  allSpeakers  = speakerService.GetAllSpeakers();
            IEnumerable <Workshops> allWorkshops = workshopService.GetAllWorkshops();
            IEnumerable <Talks>     allTalks     = talkService.GetAllTalks();

            return(View(allSpeakers));
            //IEnumerable<Editions> allEditions = editionService.GetAllEditions();
            //return View(allEditions);
        }
Beispiel #5
0
 public ActionResult <IEnumerable <Workshop> > GetAllWorkshops()
 {
     try
     {
         return(Ok(_service.GetAllWorkshops()));
     }
     catch (EmptyCollectionException ex)
     {
         return(StatusCode(StatusCodes.Status400BadRequest, $"Something bad happened: {ex.Message}"));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, $"Something bad happened: {ex.Message}"));
     }
 }
Beispiel #6
0
        // GET: Workshops
        public ActionResult Index()
        {
            IEnumerable <Workshops> allWorkshops = workshopService.GetAllWorkshops();

            return(View(allWorkshops));
        }
Beispiel #7
0
        public ActionResult <IEnumerable <WorkshopDto> > GetAll()
        {
            var workshops = service.GetAllWorkshops();

            return(Ok(mapper.Map <IEnumerable <WorkshopDto> >(workshops)));
        }
 public async Task <IActionResult> GetAllWorkshops()
 {
     return(Ok(JsonConvert.SerializeObject(_workshopService.GetAllWorkshops())));
 }
 public IEnumerable <Workshop> GetAll()
 {
     return(workshopService.GetAllWorkshops());
 }
Beispiel #10
0
 public IEnumerable <GetAllWorkshopsQuery.Workshop> GetAllWorkshops()
 => _workshopService.GetAllWorkshops();