public async Task AddItemstoMainContainer(getmainmail obj) { try { ItemResponse <getmainmail> Response = await containermain.UpsertItemAsync <getmainmail>(obj, new PartitionKey(obj.id.Substring(0, 2))); Console.WriteLine("updated item in database with id: {0} \n", Response.Resource.VerifyEmailResponse.VerifyEmailResult.ServiceResult.Email.Complete); } catch (Exception e) { Console.WriteLine(e.Message); } }
public async Task AddingAndDeleting(getmainmail obj) { await AddItemstoMainContainer(obj); await searchRetry(obj.id); if (retrysearchlist.Count != 0) { var item = retrysearchlist[0]; await DeleteItem(item.id, new PartitionKey(item.reasonCode)); } else { Console.WriteLine("item not found"); } }
public async Task AddingAndDeleting(getmainmail obj) { await AddItemstoMainContainer(obj); await DeleteItem(obj.id, new PartitionKey( obj.VerifyEmailResponse.VerifyEmailResult.ServiceResult.Email.Complete.Substring(0, 2))); }