mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
EF更新的时候,如果直接更新数据库里的记录,要以asnotracking执行查询,然后才能进行Entry操作!
This commit is contained in:
parent
b5804105ed
commit
859300b331
@ -28,7 +28,7 @@ namespace OpenAuth.Repository
|
||||
/// </summary>
|
||||
public T FindSingle(Expression<Func<T, bool>> exp)
|
||||
{
|
||||
return Context.Set<T>().FirstOrDefault(exp);
|
||||
return Context.Set<T>().AsNoTracking().FirstOrDefault(exp);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user