示例#1
0
        public async Task <ActionResult <CompetenceViewModel[]> > Get(bool includeConsultants = false)
        {
            try
            {
                var results = await repository.GetAllCompetencesAsync();

                return(mapper.Map <CompetenceViewModel[]>(results));
            }
            catch (Exception)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Error in database"));
            }
        }