Database Reference
In-Depth Information
TimeSpan.FromSeconds(1));
}
///Insert new entries in the StudentClubEntry table.
public void AddStudentClubEntry(StudentClubEntry1 newItem)
{
this.context.AddObject("StudentClubEntry1", newItem);
this.context.SaveChanges();
}
//Retrieve info about the students enrolled in the same club.
public IEnumerable < StudentClubEntry1 >
GetStudentClubEntries(string memberClub)
{
var results = from s in this.context.StudentClubEntry1
where s.PartitionKey == memberClub
select s;
return results;
}
}
}
TASK 3: CONFIGURE STOR AGE ACCOUNT
To use the Windows Azure storage services, you need to provide the authentication infor-
mation for the storage account. he authentication information such as the username and
password will be speciied in the connection string used by the StudentClubContext class.
1. To specify the connection string, expand the StudentClub node. Under the Roles
node, double click StudentClub_WebRole in the Solution Explorer pane. After
the Properties dialog is opened, click the Settings link. In the Name column, enter
DataConnectionString , and specify Connection String as the Type shown in Figure
11.12 .
2. In the Value column, click the ellipsis button labeled with the icon [...] . After the
Storage Account Connection String dialog is opened, select the option Windows
Azure storage emulator to use the local Windows Azure storage emulator and then
click OK . Later, to deploy the project to Windows Azure, the connection string will
be changed here.
TASK 4: DEVELOP STUDENT CLUB WEB PAGE AND PROCESS USER INPUT
In the previous section, you have created the data source to support the Student Club web
page. With the classes created in the previous section, the users will be able to access the data
stored in the Table storage. In this section, you will continue to develop the Student Club
web page and link the web page to the data source.
1. First, to link the data source to the web page, you need to reference the StudentClub_
Info project in the web role. To do so, right click the project StudentClub_WebRole
in Solution Explorer and select Add Reference . Expand the Solution node and click
 
Search WWH ::




Custom Search