提交 b3a10119 编写于 作者: Y Yinmany

修复DB缓存BUG

上级 27b531a3
......@@ -40,7 +40,6 @@ namespace ETModel
if (component == null)
{
component = await dbComponent.GetCollection(this.CollectionName).FindAsync((s) => s.Id == id).Result.FirstOrDefaultAsync();
dbCacheComponent.AddToCache(component);
}
if (component == null)
......
......@@ -35,10 +35,6 @@ namespace ETModel
{
// 执行查询数据库任务
component = await dbComponent.GetCollection(this.CollectionName).FindAsync((s) => s.Id == this.Id).Result.FirstOrDefaultAsync();
if (component != null)
{
dbCacheComponent.AddToCache(component);
}
this.Tcs.SetResult(component);
}
catch (Exception e)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册