public IEnumerable <TodoItemGetViewModel> GetAll() { var models = _repo.GetAll(); var result = models.Select(x => new TodoItemGetViewModel { Id = x.Id, Content = x.Content, IsCompleted = x.IsCompleted, CreatedAt = x.CreatedAt }); return(result); }
public async Task <IEnumerable <TodoItem> > GetData() { var repo = new TodoItemRepository(); return(await repo.GetAll()); }