Exemplo n.º 1
0
        public static EditionDaysDto Map(EditionDaysModel editionDays)
        {
            var dto = new EditionDaysDto();

            dto.EditionDays.AddRange(editionDays.EditionDays);

            return(dto);
        }
Exemplo n.º 2
0
        public EditionDaysModel GetEditionDays(int editionId)
        {
            var edition = _unitOfWork.EditionRepository.GetById(editionId);

            if (edition == null)
            {
                return(null);
            }

            var editionDays = GetAllDaysFromRange(edition.DateInit, edition.DateEnd);

            var editionDaysDto = new EditionDaysModel
            {
                EditionDays = editionDays
            };

            return(editionDaysDto);
        }