【发布时间】:2012-08-06 03:25:39
【问题描述】:
我正在使用 EF4.1 从我的数据库中删除一个对象:
public virtual void Delete(T entity)
{
_entities.CreateObjectSet<T>().DeleteObject(entity);
}
出现错误:
The object cannot be deleted because it was not found in the ObjectStateManager
【问题讨论】: