Skip to content

Latest commit

 

History

History

ChattyIO

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

ChattyIO Sample Code

The BusyFrontEnd sample code comprises the following items:

  • ChattyIO solution file

  • ChattyIO WebAPI project (Note that this project is an Azure web application and not a cloud service)

  • ChattyIO.DataAccess class library

  • Detailed Documentation

The ChattyIO WebAPI project contains two controllers:

  • ChattyProductController

  • ChunkyProductController

The GetProductsInSubCategoryAsync action of the ChattyProductController retrieves the details of all products held, including price histories, in the specified subcategory in the AdventureWorks2012 database. The code connects to the database and fetches the details of the subcategory, the products in the subcategory, and the price history of each product as separate database requests before formatting the data and returning the result.

The GetProductCategoryDetailsAsync action of the ChunkyProductController performs a similar task except that it fetches the data from the database in a single request.

Configuring the project

This project uses the AdventureWorks2012 database stored by using Azure SQL Database. Create the database by using the Azure Management Portal and add the connection string to the AdventureWorksProductContext connection string in the web.config file for the ChattyIO WebAPI project. Note that the new Azure portal provides a simplified version of the database (AdventureWorksLT). The AdventureWorksLT database uses a different schema from that expected by this sample application which might not function correctly unless the full AdventureWorks2012 database is installed.

Deploying the project to Azure

In Visual Studio Solution Explorer, right-click the ChattyIO.WebApi project and then click Publish. Publish the project to an Azure website.

Load testing the project

You can use Visual Studio Online to load test the application. For details of the load testing strategy for this sample, see Load Testing.

Dependencies

This project requires: