public async Task <IActionResult> Edit(int id, [Bind("reminder_id,reminder_date,reminder_content,reminder_priority,reminder_title,reminder_time,reminder_ref_id")] Reminder_doctor reminder_doctor) { if (id != reminder_doctor.reminder_id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(reminder_doctor); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Reminder_doctorExists(reminder_doctor.reminder_id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(reminder_doctor)); }
public async Task <IActionResult> Create([Bind("reminder_id,reminder_date,reminder_content,reminder_priority,reminder_title,reminder_time,reminder_ref_id")] Reminder_doctor reminder_doctor) { if (ModelState.IsValid) { _context.Add(reminder_doctor); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(reminder_doctor)); }