Exemple #1
0
        public async Task <IActionResult> Details(string id)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(id))
                {
                    return(NotFound());
                }
                Tour tour = await tourDAL.FindTourByTourIdEmpAsync(id);

                if (tour == null)
                {
                    return(NotFound());
                }
                tour.Destinations = await tourDAL.FindDestinationsByTourIdAsync(id);

                tour.Guides = await tourDAL.FindGuidesByTourIdAsync(id);

                tour.TakenSlot = await tourDAL.GetTakenSlotByTourIdAsync(id);

                return(View(tour));
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                throw;
            }
        }