10
Không thể xóa đối tượng vì nó không được tìm thấy trong ObjectStateManager
Tôi nhận được lỗi này "Không thể xóa đối tượng vì nó không được tìm thấy trong ObjectStateManager." Mã của tôi là: protected MyEntities sqlEntities; public virtual void Delete(TEntity entity) { System.Type t = typeof(TEntity); sqlEntities.DeleteObject(entity); sqlEntities.SaveChanges(); }