public async Task <ActionResult <TeamModel[]> > Get() { try { var result = await _repository.GetAllTeamsAsync(); return(_mapper.Map <TeamModel[]>(result)); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError, "Database failure!")); } }