azure - 如何使用 azure 移动服务清除本地数据库?

标签 azure xamarin xamarin.forms azure-mobile-services

我正在使用 Azure 移动服务,并且想要清除本地数据库,我该怎么做?

我的本​​地数据库有问题。当我在应用程序中注销并使用其他用户登录时,将为当前用户加载前一个用户的数据,我不知道为什么会发生这种情况。我在服务器端使用debug,服务器返回正确的数据,那么我认为问题出在本地数据库。

最佳答案

I'm using Azure Mobile Services and I want to clear local database, how can I do that?

要删除 SQLite 文件,您可以按照 Deleting the backing store 操作。此外,您还可以利用 IMobileServiceSyncTable 提供的功能来清除离线缓存下的记录,详细信息您可以按照 Purging Records from the Offline Cache 进行操作。 .

When I logout in app and login with other user, the data of the previous user is loaded for current user and I don't have idea why this occurs. I use debug on server side and the server return correct data

由于您没有提供有关实现的详细信息(例如用户登录/注销、用户数据管理等),我建议您检查您的服务器/客户端是否都启用了每用户数据存储。您可以使用 fiddler 捕获其他用户登录时的网络跟踪,并确保返回正确的用户标识符(例如 UserId),然后根据本地数据库检查查询。此外,我建议您关注阿德里安·霍尔(Adrian Hall)关于 Data Projection and Queries 的书。 .

关于azure - 如何使用 azure 移动服务清除本地数据库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50572187/

相关文章:

c# - 在 Xamarin.form 上访问 SQLite 数据库的最简单方法是什么?

c# - RestRequest 在本地工作,但不能从 azure "The request was aborted: Could not create SSL/TLS secure channel."

azure - 具有启用专用端点的 Web 应用程序的应用程序网关配置

azure - 如何从列标题中提取日期并在 azure 数据工厂中为其创建单独的列?

firebase - 错误 : package com. google.firebase.messaging 不存在

ios - Xamarin for iOS 中的分辨率独立性

xamarin - Xamarin 表单上的 FindViewById?

xamarin - 在 Xamarin Forms 3.1 中,当使用带有 4 个标签的标签页时,如何防止 Android 上标签栏的 "sliding"效果?

azure - ChatBot QnaMaker(微软 Azure)与 Lex(亚马逊 AWS)

ios - Xamarin中如何正确的给CBPeripheralManager添加服务