public async Task <Response <BD_Product> > AddALot() { try { CloudTable table = await CloudTable("Demo"); BD_Product entry = new BD_Product(); for (int i = 0; i < 500; i++) { entry.PartitionKey = "5"; entry.RowKey = DateTime.Now.Ticks.ToString(); entry.Description = i.ToString(); TableOperation insertOrMergeOperation = TableOperation.InsertOrMerge(entry); TableResult result = await table.ExecuteAsync(insertOrMergeOperation); } return(new Response <BD_Product>(new BD_Product())); } catch (Exception ex) { logger.LogError(ex, ""); return(new Response <BD_Product>(ex.Message)); } }
public async Task <IActionResult> DeleteByEntry(BD_Product product) { return(Ok(await tableStorage.Delete(product, tableName))); }
public async Task <IActionResult> Create(BD_Product product) { return(Ok(await tableStorage.AddOrMerge(product, "Products", "partitionKeeey"))); }