Training Kits里的第一篇实例教程,简单记录下过程,并根据理解做些旁注,方便日后查看。

 Building Your First Windows Azure Application

 

1. 新建一个Cloud Service工程, 增加一个ASP.NET Web Role

Building Your First Windows Azure Application

 

2. 增加一个Class Library, 添加所需References,定义Entity Schema -- GuestBookEntry.cs

  • using System;
  • using Microsoft.WindowsAzure.StorageClient;
  •  
  • namespace GuestBook_Data
  • {
  •     public class GuestBookEntry : TableServiceEntity
  •     {
  •         public GuestBookEntry()
  •         {
  •             PartitionKey = DateTime.UtcNow.ToString("MMddyyyy");
  •  
  •             // Row key allows sorting, so we make sure the rows come back in time order.
  •             RowKey = string.Format("{0:10}_{1}", DateTime.MaxValue.Ticks - DateTime.Now.Ticks, Guid.NewGuid());
  •         }
  •  
  •         public string Message { get; set; }
  •         public string GuestName { get; set; }
  •         public string PhotoUrl { get; set; }
  •         public string ThumbnailUrl { get; set; }
  •     }
  • }
  • 相关文章:

    • 2022-12-23
    • 2022-12-23
    • 2021-04-07
    • 2022-12-23
    • 2021-06-23
    • 2021-05-04
    • 2022-12-23
    • 2021-12-05
    猜你喜欢
    • 2022-12-23
    • 2021-12-28
    • 2022-12-23
    • 2022-01-09
    • 2022-01-13
    • 2022-12-23
    • 2022-12-23
    相关资源
    相似解决方案