Пример #1
0
        public static Language ToLanguage(this LanguageV1DTO item)
        {
            if (item == null)
            {
                throw new ArgumentException(nameof(item));
            }

            Language language = new Language();

            language.CopyFromLanguageV1DTO(item);
            return(language);
        }
Пример #2
0
        public static LanguageV1DTO ToLanguageV1DTO(this Language item)
        {
            if (item == null)
            {
                throw new ArgumentException(nameof(item));
            }

            LanguageV1DTO languageV1DTO = new LanguageV1DTO();

            languageV1DTO.CopyFromLanguage(item);
            return(languageV1DTO);
        }
Пример #3
0
 public static void CopyFromLanguage(this LanguageV1DTO to, Language from)
 {
     to.LanguageId   = from.LanguageId;
     to.LanguageName = from.LanguageName;
 }