public async Task <IActionResult> Create([Bind("AppointmentId,FirstName,LastName,PhoneNumber,Date,Time")] Appointment appointment) { if (ModelState.IsValid) { db.Add(appointment); await db.SaveChangesAsync(); return(RedirectToAction("thanks")); } return(View(appointment)); }
public async Task <IActionResult> Create([Bind("QuestionId,Question")] DonorQuestion donorQuestion) { if (ModelState.IsValid) { _context.Add(donorQuestion); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(donorQuestion)); }