public JsonResult Add(PainIncident incident) { if (incident == null) { throw new Exception("error"); } _data.AddPainIncident(incident); _data.SaveChanges(); return Json(new {save = true}); }
public void RemovePainIncident(PainIncident incident) { _data.PainIncidents.Remove(incident); }
public PainIncident AddPainIncident(PainIncident incident) { return _data.PainIncidents.Add(incident); }