public async Task <ActionResult> Create(CreateBookingViewModel input)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    if (input.Date == null)
                    {
                        ModelState.AddModelError("Date", "Please select a date");
                        return(View(input));
                    }

                    //if phone number is provided, make sure it is valid.
                    //if no phone number is provided, that's ok as well
                    string phoneNumber = null;
                    if (!string.IsNullOrEmpty(input.PhoneNumber))
                    {
                        phoneNumber = await _nexmo.FormatPhoneNumber(input.PhoneNumber);

                        if (phoneNumber == null)
                        {
                            ModelState.AddModelError("PhoneNumber", "Please enter a valid phone number");
                            return(View(input));
                        }
                    }

                    //Fetch primary booking if this is a clone
                    Booking primaryBooking = null;
                    if (input.PrimaryBookingId != null)
                    {
                        primaryBooking = _context.Bookings
                                         .FirstOrDefault(b => b.Id == input.PrimaryBookingId);
                    }

                    //create booking
                    var booking = new Booking()
                    {
                        BookingDate     = input.Date.Value.Date,
                        DateRegistered  = DateTime.UtcNow,
                        PassengerEmail  = input.Email,
                        PassengerName   = input.Name,
                        PassengerWeight = input.Weight,
                        PassengerPhone  = phoneNumber,
                        Comment         = input.Comment,
                        BookingEvents   = new List <BookingEvent>(),
                        PrimaryBooking  = primaryBooking,
                        PassengerFee    = input.PassengerFee,
                    };
                    _context.Add(booking);

                    //assign pilot
                    if (string.IsNullOrEmpty(input.PilotId))
                    {
                        //if no pilot is selected, find a new one
                        await _bookingService.AssignNewPilotAsync(booking);
                    }
                    else
                    {
                        //or use pilot as provided
                        var pilot = await _userManager.FindByIdAsync(input.PilotId);

                        _bookingService.AssignNewPilot(booking, pilot);
                    }
                    _context.SaveChanges();

                    await _messageService.SendNewBookingMessage(booking, new Booking[] {}, input.NotifyPassenger, input.NotifyPilot);

                    //redirect to edit action
                    return(RedirectToAction("Details", new { id = booking.Id }));
                }
            }
            catch (Exception ex)
            {
                _logger.LogError(0, $"Error creating booking, {ex.Message}, {ex}");
                ModelState.AddModelError("", $"An unexpected error occured during booking, please contact the booking coordinator, {_bookingCoordinatorSettings.Name}, on {_bookingCoordinatorSettings.PhoneNumber}");
            }

            return(View(input));
        }