public CategoriaEvento create(CategoriaEvento model) { using (var db = new SistemaDeEventosContext()) { db.CategoriaEventos.Add(model); db.SaveChanges(); return(model); } }
public bool delete(CategoriaEvento model) { using (var db = new SistemaDeEventosContext()) { db.Entry(model).State = EntityState.Deleted; db.SaveChanges(); return(true); } }
public CategoriaEvento update(CategoriaEvento model) { using (var db = new SistemaDeEventosContext()) { db.Entry(model).State = EntityState.Modified; db.SaveChanges(); return(model); } }