public async Task <IEnumerable <CodeResource> > GetCodeResources() { var codes = await _repository.GetCodes(); var result = _mapper.Map <IEnumerable <Code>, IEnumerable <CodeResource> >(codes); return(result); }
public async Task <IActionResult> GetCode() { var Items = await _repo.GetCodes(); var ItemsToReturn = _mapper.Map <IEnumerable <CodeForAddDto> >(Items); return(Ok(ItemsToReturn)); }
public async Task <Code[]> Codes([Inject] ICodeRepository repository) => _mapper.Map <Code[]>(await repository.GetCodes());
public async Task <IEnumerable <CodeResource> > GetCodes(int parentId) { var codes = await _repository.GetCodes(parentId); return(_mapper.Map <IEnumerable <Code>, IEnumerable <CodeResource> >(codes)); }