예제 #1
0
        public TextDto GetFromDb()
        {
            _logger.Log(LogLevel.Information, "get words from DB");
            var res = _wordService.GetWords(StorageOption.Db);

            return(DtoDomainMapper.ToDto(res));
        }
예제 #2
0
        public TextDto CalculateNumberOfWords(TextDto dto)
        {
            _logger.Log(LogLevel.Information, "calculating number of words");

            var domain = DtoDomainMapper.ToDomain(dto);

            _wordService.CalculateNumberOfWords(domain);

            return(DtoDomainMapper.ToDto(domain));
        }
예제 #3
0
        public TextDto GetFromFile()
        {
            _logger.Log(LogLevel.Information, "get words from file");

            return(DtoDomainMapper.ToDto(_wordService.GetWords(StorageOption.File)));
        }