public void Remove(RoleSysMenuModel entity) { using (var db = new HXContext()) { db.Entry <RoleSysMenuModel>(entity).State = System.Data.Entity.EntityState.Deleted; db.SaveChanges(); } }
public void Save(RoleSysMenuModel entity) { using (var db = new HXContext()) { db.Entry(entity).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } }
public void Add(RoleSysMenuModel entity) { using (var db = new HXContext()) { db.RoleSysMenu.Add(entity); db.SaveChanges(); } }