예제 #1
0
        public JsonResult Add(PainIncident incident)
        {
            if (incident == null) {
                throw new Exception("error");
            }

            _data.AddPainIncident(incident);
            _data.SaveChanges();

            return Json(new {save = true});
        }
예제 #2
0
 public void RemovePainIncident(PainIncident incident)
 {
     _data.PainIncidents.Remove(incident);
 }
예제 #3
0
 public PainIncident AddPainIncident(PainIncident incident)
 {
     return _data.PainIncidents.Add(incident);
 }