Пример #1
0
        public async Task <IActionResult> Get(int id)
        {
            try
            {
                var result = await _repo.GetById(id);

                return(Ok(result));
                //return Ok(Mapper.Map<CommitmentViewModel>(result));
            }
            catch (Exception ex)
            {
                _logger.LogError($"Exception thrown while getting commitment: {ex}");
                return(BadRequest($"Error ocurred"));
            }
        }