This commit is contained in:
@@ -354,8 +354,12 @@ namespace AyaNova.Biz
|
||||
return v.First();
|
||||
}
|
||||
|
||||
public static long LocaleNameToIdStatic(string localeName, AyContext ct)
|
||||
public static long LocaleNameToIdStatic(string localeName, AyContext ct = null)
|
||||
{
|
||||
if (ct == null)
|
||||
{
|
||||
ct = ServiceProviderProvider.DBContext;
|
||||
}
|
||||
var v = ct.Locale.Where(c => c.Name == localeName).Select(x => x.Id);
|
||||
if (v.Count() < 1) return ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID;
|
||||
return v.First();
|
||||
|
||||
Reference in New Issue
Block a user