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); } }