2
我使用EF4.1删除从我的数据库中的对象:该对象无法删除,因为它在ObjectStateManager中找不到?
public virtual void Delete(T entity)
{
_entities.CreateObjectSet<T>().DeleteObject(entity);
}
得到一个错误:
The object cannot be deleted because it was not found in the ObjectStateManager
http://stackoverflow.com/questions/449740/error-the-object-cannot-be-deleted-because-it-was-not-found-in-the-objectstatem – Habib 2012-08-06 04:13:18
解决方案:http:// stackoverflow .COM /问题/ 7791149 /的对象,不能待删除 - 因为,它 - 是未找到,在最objectstatemanager/19422173#19422173 – Kjartan 2013-10-17 08:58:55