Câu 6: AZ-200: Microsoft Azure Developer Core Solutions
HOTSPOT -A company is developing a mobile app for field service employees using Azure App Service Mobile Apps as the backend. The company's network connectivity varies throughout the day. The solution must support offline use and synchronize changes in the background when the app is online again. You need to implement…
Nội dung câu hỏi
HOTSPOT -A company is developing a mobile app for field service employees using Azure App Service Mobile Apps as the backend. The company's network connectivity varies throughout the day. The solution must support offline use and synchronize changes in the background when the app is online again. You need to implement the solution. How should you complete the code segment? To answer, select the appropriate options in the answer area.NOTE: Each correct selection is worth one point. Hot Area:
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. Box 1: var todoTable = client GetSyncTable () To setup offline access, when connecting to your mobile service, use the method GetSyncTable instead of GetTable (example): IMobileServiceSyncTable todoTable = App.MobileService.GetSyncTable(); Box 2: await todoTable.PullAsync("allTodoItems",todo.Table.CreateQuery()); Your app should now use IMobileServiceSyncTable (instead of IMobileServiceTable) for CRUD operations. This will save changes to the local database and also keep a log of the changes. When the app is ready to synchronize its changes with the Mobile Service, use the methods PushAsync and PullAsync (example): await App.MobileService.SyncContext.PushAsync(); await todoTable.PullAsync(); References:https://azure.microsoft.com/es-es/blog/offline-sync-for-mobile-services/ — đáp án hiện tại
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.