Exemplo n.º 1
0
        public async Task <IActionResult> GetById(Guid id)
        {
            try
            {
                var goal = await _repository.GetByIdWithMembers(id);

                var list = _mapper.Map <List <GoalsResponseModel> >(goal);

                return(Ok(list));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }