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