小编AjL*_*ing的帖子

App Center推送与通知中心

因此,似乎在整个地方都有文档的精神,docs.microsoft再次取得了成功.

考虑发送推送通知,我遇到了这两个页面:

  1. https://docs.microsoft.com/en-us/appcenter/sdk/push/uwp

  2. https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-windows-store-dotnet-get-started-push

请注意,从任一页面到另一页面都没有引用.

所以我尝试搜索谷歌,对这个问题的标题进行类似的搜索,只发现上述两页以外的内容.

这让我想到了这个问题:App Center Push和Azure Notification Hub之间的关系(和/或区别)是什么?

push-notification azure-notificationhub uwp visual-studio-app-center

8
推荐指数
1
解决办法
2250
查看次数

如何让react-native-inappbrowser-reborn在成功登录Facebook后触发成功

我正在尝试按照以下文档设置 Facebook 登录的手动流程:https ://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/

我的测试 Facebook 应用程序按预期工作,即我可以使用私人网络浏览器窗口正常登录。我使用的网址是:

https://facebook.com/v3.3/dialog/oauth?client_id=<app_id>&display=popup&response_type=token&redirect_uri=https://www.facebook.com/connect/login_success.html
Run Code Online (Sandbox Code Playgroud)


现在,在我的 React-Native 应用程序中,我正在使用iOS 上的react-native-inappbrowser-reborn演示SFAuthenticationSession。根据他们的文档(位于https://www.npmjs.com/package/react-native-inappbrowser-reborn),我正在执行以下操作:

const redirectUri = "https://www.facebook.com/connect/login_success.html"
const url = "https://facebook.com/v3.3/dialog/oauth?client_id="+appId+"&display=popup&response_type=token&redirect_uri=https://www.facebook.com/connect/login_success.html"

InAppBrowser.isAvailable()
.then(() => {
InAppBrowser.openAuth(url, redirectUri, {
    // iOS Properties
    dismissButtonStyle: 'cancel',
    // Android Properties
    showTitle: false,
    enableUrlBarHiding: true,
    enableDefaultShare: true,
})
.then((response) => {
    // Only gets to this point if user explicitly cancels.
    // So this does not trigger upon successful login.
})
// catch handlers follow
Run Code Online (Sandbox Code Playgroud)


使用上述内容,我的应用程序可以正确打开应用程序内浏览器,并且我可以使用我的测试应用程序的测试用户正常登录。但成功登录后,我不会被重定向回.then完成处理程序。它只是停留在应用程序内浏览器视图中,我看到来自 Facebook …

facebook-apps react-native

5
推荐指数
1
解决办法
5488
查看次数

如何提高使用多个 Include 的 EF Core 查询的性能

我有这个查询,为了简洁起见,我将简化它:

public IQueryable<User> GetByIdAsync(Guid userId)
{
    return MyContext
        .Users
        //Bunch of Includes
            //Most of which have a ThenInclude
                //Followed by another ThenInclude
        .FirstOrDefaultAsync(u => u.Id == userId)
}
Run Code Online (Sandbox Code Playgroud)

当为大约 100 个用户运行时,需要超过 15 秒(在我的计算机上本地运行)。不是很好。

我尝试过使用AsNoTracking(),以及将其更改为使用已编译的查询,如下所示:

private static Func<MyContext, Guid, Task<User>> _getByIdAsync =
            EF.CompileAsyncQuery((MyContext context, Guid userId) =>
                context
                .Users
                //Same Includes as above
                .Where(u => u.Id == userId)
                .FirstOrDefault());

public IQueryable<User> GetByIdAsync(Guid userId)
{
    return await _getByIdAsync(userId);
}
Run Code Online (Sandbox Code Playgroud)

还是没有区别。

我查看了相关线程的答案,它建议使用普通的旧 SQL:

/sf/answers/1188405291/

我查看了这个答案,其中提到了聚集索引:

/sf/answers/3889006621/

我当然不能排除其中任何一个,Includes因为客户依赖于所有这些信息。在这个阶段,重新设计也不是一个选择。

问题

  1. 还有其他可以提高性能的选项吗? …

performance database-performance psql entity-framework-core

5
推荐指数
1
解决办法
2113
查看次数