This commit is contained in:
@@ -331,12 +331,21 @@ namespace AyaNova.Biz
|
|||||||
#endif
|
#endif
|
||||||
var ret = await ct.TranslationItem.Where(z => z.TranslationId == UserTranslationId && param.Contains(z.Key)).AsNoTracking().ToDictionaryAsync(z => z.Key, z => z.Display);
|
var ret = await ct.TranslationItem.Where(z => z.TranslationId == UserTranslationId && param.Contains(z.Key)).AsNoTracking().ToDictionaryAsync(z => z.Key, z => z.Display);
|
||||||
#if (DEBUG)
|
#if (DEBUG)
|
||||||
if(ret.Count!=param.Count){
|
if (ret.Count != param.Count)
|
||||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<TranslationBiz>();
|
{
|
||||||
|
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<TranslationBiz>();
|
||||||
var missingItems = param.Where(p => ret.All(p2 => p2.Key != p));
|
|
||||||
|
|
||||||
log.LogError($"********* GetSubsetAsync Non existant keys requested: {string.Join( ",", missingItems)}");
|
var missingItems = param.Where(p => ret.All(p2 => p2.Key != p)).ToList();
|
||||||
|
var duplicateItems = param.GroupBy(x => x)
|
||||||
|
.Where(g => g.Count() > 1)
|
||||||
|
.Select(y => y.Key)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
if (missingItems.Count > 0)
|
||||||
|
log.LogError($"********* GetSubsetAsync problem: Non existant keys: {string.Join(",", missingItems)}");
|
||||||
|
|
||||||
|
if (duplicateItems.Count > 0)
|
||||||
|
log.LogError($"********* GetSubsetAsync problem: Duplicate keys: {string.Join(",", duplicateItems)}");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user