0
manojreddy created
I have a class TestRepository in which I want to get the localized string, but I get error >The name 'L' does not exist in the current context if I try
throw new UserFriendlyException(L("TestAlreadyExists"));
public class TestRepository : TestRepositoryBase<Test, int>, ITestRepository
1 Answer(s)
-
0
The L helper is not defined for repositories.
You can inject ILocalizationManager and define it:
private string L(string name) { return _localizationManager.GetString(AbpZeroTemplateConsts.LocalizationSourceName, name); }