Beispiel #1
0
        public ActionResult Create(PancakeEntity pancakeEntity)
        {
            CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
            CloudQueue       queue       = queueClient.GetQueueReference("pancakequeue");

            queue.CreateIfNotExists();

            pancakeEntity.PartitionKey = DateTime.Now.ToString("yyyyMM");
            pancakeEntity.RowKey       = Hash.getHashSha256(String.Format("{0}{1}{2}{3}",
                                                                          pancakeEntity.PartitionKey, pancakeEntity.RowKey, pancakeEntity.Title, pancakeEntity.Timestamp));
            var jsonObject = JsonConvert.SerializeObject(pancakeEntity);

            CloudQueueMessage message = new CloudQueueMessage(jsonObject);

            queue.AddMessage(message);
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Display(PancakeEntity item)
 {
     return(View(item));
 }