public async Task <IActionResult> Create([Bind("OutboundFlightId,CustomerId,OutboundDate,OneWay,ReturnFlightId,ReturnDate")] Travel travel) { if (ModelState.IsValid) { travel.OutboundFlightId = Guid.NewGuid(); _context.Add(travel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CustomerId"] = new SelectList(_context.Customers, "CustomerId", "CustomerId", travel.CustomerId); return(View(travel)); }