public async Task <IActionResult> CreateEmploye([Bind("Idemploye,EmployType,FirstName,IdHotel,LastName,Password,Username")] Employes employes) { if (ModelState.IsValid) { _context.Add(employes); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdHotel"] = new SelectList(_context.Hotels, "IdHotel", "HotelName", employes.IdHotel); return(View(employes)); }