Book Image

Learning Microsoft Azure

By : Geoff Webber Cross, Geoff Webber-Cross
Book Image

Learning Microsoft Azure

By: Geoff Webber Cross, Geoff Webber-Cross

Overview of this book

Table of Contents (19 chapters)
Learning Microsoft Azure
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Exploring the mobile service sample project


The mobile service project has a similar structure to our MVC projects and more so the Web API project because it's built on the same technology. We have an App_Start folder with a WebApiConfig class, which takes care of initializing and configuring the application, and a Controllers folder with a TodoItemController sample class, which is a special type of API controller that is strongly bound to the EntityData type models, which have a number of default fields enforced by the ITableData interface:

public interface ITableData
{
    [JsonProperty(PropertyName = "__createdAt")]
    DateTimeOffset? CreatedAt { get; set; }
    [JsonProperty(PropertyName = "__deleted")]
    bool Deleted { get; set; }
    string Id { get; set; }
    [JsonProperty(PropertyName = "__updatedAt")]
    DateTimeOffset? UpdatedAt { get; set; }
    [JsonProperty(PropertyName = "__version")]
    [SuppressMessage("Microsoft.Performance", 
    byte[] Version { get; set; }
}

The project...