示例#1
0
        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);
            }
        }
示例#2
0
        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");
            }
        }
示例#3
0
 public async Task AddingAndDeleting(getmainmail obj)
 {
     await AddItemstoMainContainer(obj);
     await DeleteItem(obj.id, new PartitionKey( obj.VerifyEmailResponse.VerifyEmailResult.ServiceResult.Email.Complete.Substring(0, 2)));
 }