1.方法一,面向对象
using (MyDbContent content = new MyDbContent()) { content.Entry<UserInfo>(model).State = System.Data.Entity.EntityState.Deleted; content.SaveChanges(); }
1.方法一,面向对象
using (MyDbContent content = new MyDbContent()) { content.Entry<UserInfo>(model).State = System.Data.Entity.EntityState.Deleted; content.SaveChanges(); }