Exemplo n.º 1
0
        public IReadOnlyList <WordModel> GetPagedAll(int page, int pageSize, string filter)
        {
            var wordEntites = repo.GetPagedAll(page, pageSize);

            var list = new List <WordModel>();

            foreach (var wordEntity in wordEntites)
            {
                list.Add(WordMapper.ConvertEntityToModel(wordEntity));
            }

            return(list);
        }
Exemplo n.º 2
0
        public WordModel GetWord(string word)
        {
            var found = repo.SingleOrDefault(w => w.Name == word);

            return(found == default ? null : WordMapper.ConvertEntityToModel(found));
        }