Exemplo n.º 1
0
        public async Task <ActionResult <CampModels> > GetById(int id, bool includeTalks = false)
        {
            try
            {
                var result = await campRepository.GetCampById(id, includeTalks);

                CampModels campModels = mapper.Map <CampModels>(result);
                return(campModels);
            }
            catch (Exception)
            {
                return(this.StatusCode(500, "Database Failure"));
            }
        }