public async Task <ICollection <TagDto> > GetAll() { var tags = await _repository.GetAll(); var tagsDto = _mapper.Map <TagDto[]>(tags); return(tagsDto); }
public async Task <IEnumerable <TagsDomainModel> > GetAllAsync() { var data = await _tagsRepository.GetAll(); if (data == null) { return(null); } List <TagsDomainModel> result = new List <TagsDomainModel>(); TagsDomainModel model; foreach (var item in data) { model = new TagsDomainModel { Id = item.Id, Name = item.Name }; result.Add(model); } return(result); }
public ViewResult Index() { var model = tagsRepo.GetAll(); return(View(model)); }
private async Task InitializeAsync() { Tags = new ObservableCollection <string>(await _tagsRepository.GetAll()); RaisePropertyChanged(() => Tags); }
public IEnumerable <TagsViewModel> GetAll() { return(_mapper.Map <List <TagsViewModel> >(_tagsRepository.GetAll())); }