Example #1
0
		public static int InsertOrUpdateModules(Module module){
			var lookup = ModuleTable.LookupAsync (module.id);
			if (lookup == null || module.id == null) {
				ModuleTable.InsertAsync (module);
			} else {
				ModuleTable.UpdateAsync (module);
			}
			MobileService.SyncContext.PushAsync();
			return 1;
		}
Example #2
0
		public static async Task<Module> GetModule(string moduleId) {
			var x = new Module ();
			x = await ModuleTable.LookupAsync (moduleId).ConfigureAwait(false);
			return x;
		}