Click here to Skip to main content
15,892,161 members
Articles / Web Development / ASP.NET

Azure Blob and Entity Table Integration, Extending the Thumbnail Sample

Rate me:
Please Sign up or sign in to vote.
4.54/5 (5 votes)
19 May 2010CPOL7 min read 31.8K   330   11  
This article describes the concepts for doing CRUD (Create, Read, Update, Delete) operations on Windows Azure Tables and how table data can interact with blobs.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;

namespace Thumbnails_WebRole
{
    public class PhotoTableDataModel:TableServiceEntity
{
    //partition key is album name and rowkey is datetime_guid which is the blob container id and blob name
        
        public PhotoTableDataModel(string partitionKey, string rowKey)
        : base(partitionKey, rowKey)
    {
    }

    public PhotoTableDataModel(): this(Guid.NewGuid().ToString(), String.Empty)
    {
    }
    public int blobcounter { get; set; }
    public string PhotoName { get; set; }
    public string PhotoComment { get; set; }
    public DateTime PhotoTakenDate { get; set; }
    public DateTime PhotoUploadDate { get; set; }
   
}
    public class PhotoTableDataModelwithUrl : PhotoTableDataModel
    {
        //Mainly for easy data binding to display images
        public string Url { get; set; }
    }
   
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United States United States
Vijay Kumar: Architect, Programmer with expertise and interest in Azure, .net, Silverlight, C#, WCF, MVC, databases and mobile development. Concentrating on Windows Phone 7 and Windows Azure development. Lived in California for many years and done many exciting projects in dotnet and Windows platforms. Moved to Raleigh (RTP), North Carolina recently and available for consulting.  Blog http://Silverazure.blogspot.com.

Comments and Discussions