Exemplo n.º 1
0
        public JsonResult Add(PainIncident incident)
        {
            if (incident == null) {
                throw new Exception("error");
            }

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

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