修复排序错误

This commit is contained in:
2023-11-16 14:55:37 +08:00
parent 5b49890a4f
commit a5f3d473e6
15 changed files with 261 additions and 154 deletions

View File

@@ -101,6 +101,14 @@ public class DataAccess : IDataAccess, ITransient, IDisposable
return model;
}
/// <summary>
/// 获取 Vmodel 的缓存键
/// </summary>
public string GetVmodelCacheKey(string id)
{
return $"tnb.vmodel:{id}";
}
/// <summary>
/// 获取 Vmodel, 为空时不抛异常
/// </summary>
@@ -119,7 +127,7 @@ public class DataAccess : IDataAccess, ITransient, IDisposable
/// </summary>
public async Task<Vmodel> GetVmodelAsync(string id, bool loadNavigate = false)
{
var key = $"tnb.vmodel:{id}";
var key = GetVmodelCacheKey(id);
var vm = await _cache.GetAsync<Vmodel>(key);
if (vm == null)
{