public async Task <IActionResult> Edit(int id, [Bind("BloodPressureRiskId,DateDateEntered,SystolicPressure,DiastolicPressure,PulseRate,DateTaken,TimeTaken,SystolicBpgoal,DiastolicBpgoal,Comments")] BloodPressureRisk bloodPressureRisk) { if (id != bloodPressureRisk.BloodPressureRiskId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(bloodPressureRisk); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BloodPressureRiskExists(bloodPressureRisk.BloodPressureRiskId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(bloodPressureRisk)); }
public async Task <IActionResult> Create([Bind("BloodPressureRiskId,DateDateEntered,SystolicPressure,DiastolicPressure,PulseRate,DateTaken,TimeTaken,SystolicBpgoal,DiastolicBpgoal,Comments")] BloodPressureRisk bloodPressureRisk) { if (ModelState.IsValid) { _context.Add(bloodPressureRisk); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(bloodPressureRisk)); }