This commit is contained in:
2018-09-18 18:08:15 +00:00
parent e5370b4092
commit 39530bf493
3 changed files with 47 additions and 19 deletions

View File

@@ -339,11 +339,20 @@ namespace AyaNova.Biz
return ct.Locale.Any(e => e.Id == id);
}
public static bool LocaleExistsStatic(long id, AyContext ct)
{
return ct.Locale.Any(e => e.Id == id);
}
public static long EnsuredLocaleIdStatic(long id, AyContext ct)
{
if (!ct.Locale.Any(e => e.Id == id))
return ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID;
return id;
}
public bool LocaleItemExists(long id)
{
return ct.LocaleItem.Any(e => e.Id == id);