public async Task <IActionResult> Create([Bind("Id,ImagePath,ImageTitle,AboutTourText,AboutTourNumber")] BronLankaran bronLankaran) { if (ModelState.IsValid) { _context.Add(bronLankaran); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(bronLankaran)); }
public async Task <IActionResult> Create([Bind("Id,AboutTour")] QabalaDescriptions qabalaDescriptions) { if (ModelState.IsValid) { _context.Add(qabalaDescriptions); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(qabalaDescriptions)); }
public async Task <IActionResult> Create([Bind("Id,AboutInsuarance")] InsuaranceDescription insuaranceDescription) { if (ModelState.IsValid) { _context.Add(insuaranceDescription); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(insuaranceDescription)); }
public async Task <IActionResult> Create([Bind("Id,Hotels")] NaftalanDescription naftalanDescription) { if (ModelState.IsValid) { _context.Add(naftalanDescription); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(naftalanDescription)); }
public async Task <IActionResult> Create([Bind("Id,AboutHotel")] BilgehDescription bilgehDescription) { if (ModelState.IsValid) { _context.Add(bilgehDescription); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(bilgehDescription)); }
public async Task <IActionResult> Create([Bind("Id,TourInclude")] GoyGolDescription goyGolDescription) { if (ModelState.IsValid) { _context.Add(goyGolDescription); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(goyGolDescription)); }
public async Task <IActionResult> Create([Bind("Id,FirstSlide,FirstSlideText,SecondSlide,SecondSlideText,ThirdSlide,ThirdSlideText,FourthSlide,FourthSlideText,Title,SubTitle")] AzeTitleSubtitle azeTitleSubtitle) { if (ModelState.IsValid) { _context.Add(azeTitleSubtitle); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(azeTitleSubtitle)); }
public async Task <IActionResult> Create([Bind("Id,Name,Price,Description,TypeOf,Value")] BronHotel bronHotel) { if (ModelState.IsValid) { _context.Add(bronHotel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(bronHotel)); }
public async Task <IActionResult> Create([Bind("Id,Name,Surname,Email,Number,PassportNumber,Birth,Parent,Child,Baby,Message")] PersonalInformation personalInformation) { if (ModelState.IsValid) { _context.Add(personalInformation); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(personalInformation)); }
public async Task <IActionResult> Create([Bind("Id,Name,Surname,Age")] DemoStudent demoStudent) { if (ModelState.IsValid) { _context.Add(demoStudent); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(demoStudent)); }
public async Task <IActionResult> Create([Bind("id,AboutTransport")] TransportDescription transportDescription) { if (ModelState.IsValid) { _context.Add(transportDescription); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(transportDescription)); }
public async Task <IActionResult> Create([Bind("Id,Name,Surname,Email,Number,Messaging")] Message message) { if (ModelState.IsValid) { _context.Add(message); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(message)); }
public async Task <IActionResult> Create([Bind("Id,Name,Surname,Email,Number,Message,Tour,DateTime")] SimpleInformation simpleInformation) { if (ModelState.IsValid) { _context.Add(simpleInformation); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(simpleInformation)); }
public async Task <IActionResult> Create([Bind("Id,ImagePath,ImageText,Title,SubTitle,Name,Price,Description,ServiceId,UserId")] GroupTour groupTour) { if (ModelState.IsValid) { _context.Add(groupTour); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ServiceId"] = new SelectList(_context.Services, "Id", "Id", groupTour.ServiceId); return(View(groupTour)); }
public IActionResult Form(Appointment appointment) { // If this appointment matches the ModelState, push to database if (ModelState.IsValid) { _context.Add(appointment); _context.SaveChanges(); return(RedirectToAction("ViewAppointments")); } // Else return user to form page to fix errors return(View(appointment)); }