Ejemplo n.º 1
0
 public Tuple <string, string> Map(ContingentUnit contingentUnit)
 {
     return(new Tuple <string, string>(
                contingentUnit?.Name ?? string.Empty,
                divCourseMapper.Map(contingentUnit)
                ));
 }
        public string Map(ContingentUnit contingentUnit)
        {
            if (contingentUnit != null)
            {
                var division = contingentUnit?.Division?.PublicDivisions?.FirstOrDefault();
                var course   = (language == LanguageCode.English) ?
                               $"{contingentUnit.CourseNumber} course" :
                               $"{contingentUnit.CourseNumber} курс";
                var divisionName = division?.GetNameByLanguage(language);

                return((division?.GetNameByLanguage(language) == null) ?
                       course : $"{divisionName} — {course}");
            }

            return(string.Empty);
        }