public void AlterarPerfil(int codigoPerfil, AlterarPerfilRequest request) { try { unitOfWork.BeginTransaction(); painelRepositorio.AlterarPerfil(codigoPerfil, request.Descricao, request.Identificacao); unitOfWork.Commit(); } catch { unitOfWork.Rollback(); throw; } finally { unitOfWork.Dispose(); } }
public IHttpActionResult AlterarPerfil([FromUri] int codigoPerfil, [FromBody] AlterarPerfilRequest request) { painelAppServico.AlterarPerfil(codigoPerfil, request); return(Ok()); }