public async Task <IActionResult> Get() { try { return(Ok(await _repository.GetAllAsync())); } catch (Exception ex) { return(StatusCode(500, ex)); } }
public async Task <IEnumerable <CollaboratorViewModel> > GetAllAsync() { return(_mapper.Map <IEnumerable <CollaboratorViewModel> >(await _collaboratorRepository.GetAllAsync())); }