This commit is contained in:
@@ -372,6 +372,19 @@ namespace AyaNova.Biz
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Get translation of one key for specified translation id
|
||||
// Used for internal error message translation to return
|
||||
// during object validation etc. Intended to be as efficient as possible
|
||||
//
|
||||
internal static async Task<string> GetTranslationStaticAsync(string translationKey, long translationId, AyContext ct)
|
||||
{
|
||||
#if (DEBUG)
|
||||
TrackRequestedKey(translationKey);
|
||||
#endif
|
||||
return await ct.TranslationItem.Where(z => z.TranslationId == translationId && z.Key == translationKey).AsNoTracking().Select(z => z.Display).FirstOrDefaultAsync();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user