public override async Task <BaseReply> Alterar(ProjetoModel request, ServerCallContext context) { return(await Task.FromResult(new BaseReply { Sucesso = _projetoAppService.Alterar(_mapper.Map <ProjetoViewModel>(request)) })); }
public override async Task <BaseReply> Alterar(TipoTarefaModel request, ServerCallContext context) { return(await Task.FromResult(new BaseReply { Sucesso = _tipoTarefaAppService.Alterar(_mapper.Map <TipoTarefaViewModel>(request)) })); }
public IActionResult Put(Guid id, [FromBody] ProjetoViewModel obj) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != obj.Id) { return(BadRequest()); } try { _projetoAppService.Alterar(obj); } catch (Exception) { if (!ObjExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }