Beispiel #1
0
        public IActionResult ReadMore(Guid id)
        {
            try
            {
                var holidayDb = holidayService.GetById(id);

                var viewModel = new DetailsHolidayViewModel
                {
                    Type        = holidayDb.Type,
                    Days        = holidayDb.Days,
                    Description = holidayDb.Description
                };

                return(PartialView("_ReadMore", viewModel));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }