protected override Task <JToken> OnExecuteAsync() { // for insert operations version should not be sent so strip it out JObject item = MobileServiceSerializer.RemoveSystemProperties(this.Item, out _); return(this.Table.InsertAsync(item)); }
// we want to keep version as it rides on the object until the sync operation happens using classic table. internal static JObject RemoveSystemPropertiesKeepVersion(JObject instance) { instance = MobileServiceSerializer.RemoveSystemProperties(instance, out string version); if (version != null) { instance[MobileServiceSystemColumns.Version] = version; } return(instance); }