Reputation: 570
I am implementing offline capabilities to the store app using .NET backend Mobile Service with on-premise SQL server. In my SQL Server already have tables and data in it.
So, I added all the required models in to mobile service project and published the mobile service to azure. Also added all five system properties Id, CreatedAt, Deleted, UpdatedAt and Version to the existing tables in Database manually to enable database tables for offline capability.
But, My issue is one of the table already have a rowversion type column, So, when I tried to add Version column into the table it gives an error 'A table can have only one rowversion column',
My problem is I cannot rename the existing rowversion column to Version because the same db is using by other applications.
My question is can we use the existing rowversion column in place of Version?
Upvotes: 1
Views: 111
Reputation: 3875
Yes, you can use a different column name, just use Automapper to map your existing column to the Version property in ITableData.
Here's a sample that shows how to do it: https://github.com/paulbatum/FieldEngineerLite/tree/master/FieldEngineerLite.Service
Upvotes: 1