public async Task <IActionResult> Create([Bind("AppointmentId,FirstName,LastName,PhoneNumber,Date,Time")] Appointment appointment) { if (ModelState.IsValid) { _context.Add(appointment); await _context.SaveChangesAsync(); return(RedirectToAction("index")); } 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)); }