Beispiel #1
0
 public static async void UpdateAsync(String tableName)
 {
     try
     {
         Dictionary <String, Object> obj = Backendless.Data.Of($"{tableName}").FindFirst();
         obj["Age"]  = new Random().Next(2, 50);
         obj["Name"] = HelperCRUD.RandomString(new Random().Next(3, 16));
         await Backendless.Data.Of($"{tableName}").SaveAsync(obj);
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Beispiel #2
0
 public static void Create(String tableName)
 {
     try
     {
         Dictionary <String, Object> obj = new Dictionary <String, Object>();
         obj["Age"]  = new Random().Next(2, 50);
         obj["Name"] = HelperCRUD.RandomString(new Random().Next(3, 16));
         Backendless.Data.Of($"{tableName}").Save(obj);
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }