public StatusEvento CreateStatus(StatusEvento model) { using (var db = new SistemaDeEventosContext()) { db.StatusEventos.Add(model); db.SaveChanges(); return(model); } }
public bool Excluir(StatusEvento model) { using (var db = new SistemaDeEventosContext()) { db.Entry(model).State = EntityState.Deleted; db.SaveChanges(); return(true); } }
public StatusEvento Update(StatusEvento model) { using (var db = new SistemaDeEventosContext()) { db.Entry(model).State = EntityState.Modified; db.SaveChanges(); return(model); } }