0

Currently looking at the Enable Offline Sync for Xamarin Form : https://learn.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-offline-data.

I am having the code running on mobile and the backend run and created ToDoList table with 2 entries. The table created in ToDoList has UpdateAt, Version and Deleted columns create from the controller which extends TableController.

In existing web application currently already using the database with tables, do I have to create all the tables with UpdateAt, Version and Deleted columns. I am unsure how this data generated for those columns in web application so that both mobile and web data can be consistent.

1 Answer 1

1

This free online book will go through details of getting the backend setup.

https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter3/dataconcepts/

One of the ways described is to you EF already built in Code-First with migrations, and have a base class that looks like this

public abstract class TableData
    {
        public string Id { get; set; }
        public DateTimeOffset? UpdatedAt { get; set; }
        public byte[] Version { get; set; }
    }

Those are the table properties missing you asked about.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks. Yea i know it will create this columns for mean in the database but what if my existing tables used by the web application doesn't have this columns. Do I need to add them manually? coz it can be troublesome coz webapp not considered this scenerio
Yes have to add them manually to the DB or with a migration. Your Webapp should be protected from the entity changes, by projecting to to models in your linq queries. the backend server piece is this article learn.microsoft.com/en-us/azure/app-service-mobile/…
Just found this yesterday azure.microsoft.com/en-us/updates/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.