public comum.dto.Perfil Request(DesconectarRequest request) { return(new comum.dto.Perfil { UsuarioId = request.UsuarioId.ToGuid(), PerfilId = request.PerfilId, RedeSocial = (RedeSocialEnum)request.RedeSocial, Ativo = request.Ativo }); }
public override Task <DesconectarResponse> Desconectar(DesconectarRequest request, ServerCallContext context) { var response = new DesconectarResponse(); try { var perfil = desconectar.Request(request); perfilService.Desconectar(perfil); response.HttpStatusCode = (int)HttpStatusCode.OK; } catch (Exception ex) { response.Erro = ex.Message; response.HttpStatusCode = (int)HttpStatusCode.InternalServerError; } return(Task.FromResult(response)); }