コード例 #1
0
        public List <LanguageViewModel> GetAll(string columnName, string searchString, Guid countryId)
        {
            List <Language> entities;

            switch (columnName.ToLower())
            {
            case "languagename":
                entities = _repository.GetByLanguageName(searchString, countryId);
                break;

            case "languageshortname":
                entities = _repository.GetByLanguageShortName(searchString, countryId);
                break;

            default:
                entities = _repository.GetAll(countryId);
                break;
            }

            if (entities == null)
            {
                throw new Exception(LOCALIZATION_LANGUAGE_NOT_FOUND);
            }

            return(LanguagesMapper.MapToViewModel(entities));
        }
コード例 #2
0
 public LanguageViewModel GetByCultureId(int lcid, Guid countryId)
 {
     return(LanguagesMapper.MapToViewModel(_repository.GetByCultureId(lcid, countryId)));
 }
コード例 #3
0
 public List <LanguageViewModel> GetAll(Guid countryId)
 {
     return(LanguagesMapper.MapToViewModel(_repository.GetAll(countryId)));
 }