Exemplo n.º 1
0
        public async Task <IActionResult> Update([FromRoute] Guid technologyId, [FromBody] TechnologyRequest request)
        {
            var technology = await _technologyService.GetTechnologyByIdAsync(technologyId);

            technology.Name        = request.Name;
            technology.Description = request.Description;

            var updated = await _technologyService.UpdateTechnologyAsync(technology);

            if (updated)
            {
                return(Ok(_mapper.Map <TechnologyResponse>(technology)));
            }

            return(NotFound());
        }