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); }
public WordModel GetWord(string word) { var found = repo.SingleOrDefault(w => w.Name == word); return(found == default ? null : WordMapper.ConvertEntityToModel(found)); }