Anda di halaman 1dari 35

Hands-On Lab

Accessing Cloud Data with Windows Azure Marketplace


Lab version: Last updated: 1.0.0 2/10/12

CONTENTS

OVERVIEW.................................................................................................................................................4 EXERCISE 1: SUBSCRIBE TO A MICROSOFT WINDOWS AZURE MARKETPLACE DATASET..........6

Task 1 Registering for a Windows Azure Marketplace Account.........................6 Task 2 Subscribing to the DATA.Gov Dataset....................................................7 Task 3 Reviewing your My Data Pages..............................................................8 Task 4 Exploring GOV.Data................................................................................9 Exercise 1 Verification........................................................................................10

EXERCISE 2: CREATE A BUSINESS DATA CATALOG MODEL TO ACCESS THE DATASET..........10

Task 1 Adding a Service Reference to the DATA.Gov Web Service..................11 Task 2 Modifying the Entity1 Class..................................................................12 Task 3 Modifying the ReadList Method of the Entity1Service Class.................13 Task 4 Modifying the ReadItem Method of the Entity1Service Class...............15 Task 5 Updating the Models Type Descriptors................................................16 Task 6 Adding the SiteUrl Property to the Features Element File...................19 Task 7 Modifying the Models Permission in Central Administration................21

EXERCISE 3: CREATE AN EXTERNAL LIST TO CONSUME THE MARKETPLACE DATASET..........24

Task 1 Creating an External List......................................................................24 Exercise 3 Verification........................................................................................26

EXERCISE 4: CREATE A WEB PART TO DISPLAY THE MARKETPLACE DATA...............................26

Task 1 Opening and Review the Starter Solution.............................................26 Task 2 Adding the Silverlight Client Side Object Model References.................27 Task 3 Completing the Existing View Model....................................................28 Task 4 Replacing and Review the MainPage Xaml Markup..............................32 Task 5 Completing the Existing MainPage.Xaml.cs Code Beside.....................32 Exercise 4 Verification........................................................................................34

EXERCISE 5: DEPLOY THE WEB PART................................................................................................34

Task 1 Deploying the Solution.........................................................................34

SUMMARY................................................................................................................................................37

Summary

Overview
Working in the cloud is becoming a major initiative for application development departments. Windows Azure is Microsofts cloud incorporating data and services. This lab will guide the reader through a series of exercises that creates a Silverlight Web Part that displays Windows Azure Marketplace data on a Silverlight Bing map control.

Objectives
This lab will demonstrate how you can consume Windows Azure data using SharePoint 2010 and a Silverlight Web Part. To demonstrate connecting to Windows Azure data the reader will Subscribe to a Microsoft Windows Azure Marketplace dataset Create a Business Data Catalog model to access the dataset Create an external list to expose the dataset Create a Silverlight Web Part to display the data Deploy the Web Part.

System Requirements
You must have the following items to complete this lab: 2010 Information Worker Demonstration and Evaluation Virtual Machine Microsoft Visual Studio 2010 Bing Silverlight Map control and Bing Map Developer Id Silverlight WebPart Internet Access

Setup
You must perform the following steps to prepare your computer for this lab... 1. Download the 2010 Information Worker Demonstration and Evaluation Virtual Machine from http://tinyurl.com/2avoc4b and create the Hyper-V image. 2. Install the Visual Studio 2010 Silverlight Web Part. The Silverlight Web Part is an add-on to Visual Studio 2010.

3. Create a document library named SilverlightXaps located at http://intranet.contoso.com/silverlightxaps. This is where you will store the Silverlight Xap in SharePoint. 4. Create a Bing Map Developer Account. 5. Download and install the Bing Map Silverlight Control.

Exercises
This Hands-On Lab comprises the following exercises: 1. Subscribe to a Microsoft Windows Azure MarketPlace Dataset 2. Create a Business Data Catalog Model to Access the Dataset 3. Create an External List to Consume the MarketPlace Dataset 4. Create a Web Part to Display the MarketPlace Data 5. Deploy the Web Part Estimated time to complete this lab: 60 minutes.

Starting Materials
This Hands-On Lab includes the following starting materials. Visual Studio solutions. The lab provides the following Visual Studio solutions that you can use as starting point for the exercises. <Install>\Labs\ACDM\Source\Begin\TheftStatisticsBDCModel \ TheftStatisticsBDCModel.sln: This solution creates the Business Data Catalog application. <Install>\Labs\ACDM\Source\Begin\ TheftStatisticsWebPart \ TheftStatisticsWebPart.sln: This solution creates the Silverlight Web Part and Silvelright application that will consume data using an external list.

Note: Inside each lab folder, you will find an end folder containing a solution with the completed lab exercise.

Exercise 1: Subscribe to a Microsoft Windows Azure Marketplace dataset

Task 1 Registering for a Windows Azure Marketplace Account In this task, you will use Internet Explorer to navigate to Windows Azure Marketplace and register for a Marketplace account. 1. Open Internet Explorer and navigate to http://datamart.azure.com. 2. Click the Sign In link in the right-top corner.

Figure 1 Sign In of DataMarket 1. Sign in using your Windows Live Id account. 2. Click the Register link in the upper-right corner to create a new DataMarket account. 3. Enter your account details including first name, last Name, organization name and E-mail address.

Figure 2 DataMarket registration 1. Click Continue. 2. Select I accept the terms of use check box on the bottom of the Registration page. 3. Click Register link in lower right hand corner of the page.

Figure 3 Register Button Task 2 Subscribing to the DATA.Gov Dataset

In this task, you will subscribe to the DATA.Gov dataset. If you have just finished with Task 1 are still signed into Windows Azure MarketPlace you can skip steps 2 and 3. 1. Open Internet Explorer and navigate to http://datamart.azure.com. 2. Click the Sign In link in the right-top corner. 3. Sign in using your Windows Live Id account. 4. Click Explorer the MarketPlace link.

Figure 4 Explore the MarketPlace link 1. Click on the DATA.Gov image.

Figure 5 Data.gov image 1. Click Sign Up to subscribe to the dataset. 2. Verify the subscription price on this page. Select I have read and agree to the terms of use checkbox on the Subscription Dataset Terms page. 3. Click Sign Up. Task 3 Reviewing your My Data Pages In this task, you will review the three My Data pages and located your Account key that is used for authentication and tracking MarketPlace requests later in this lab. If you have just finished with Task 2 are still signed into Windows Azure MarketPlace you can skip steps 2 and 3. 1. Open Internet Explorer and navigate to http://datamart.azure.com.

2.

Click the Sign In link in the right-top corner.

3. Sign in using your Windows Live Id account. 4. Click My Data menu item at the top of the page.

Figure 6 My Data menu item 1. Click on Account Information link located in the left-hand navigation.

Figure 7 Account Information Link 1. Review the data in the Account Information Page. You can edit your account information from this page. 2. Click on Account Keys link located in the left-hand navigation. 3. Review the Account Keys page. Notice that you can create and edit keys in this page. You will use the key later in the lab for tracking and data access purposes. 4. Click on DataSets link located in the left-hand navigation. 5. Review the DataSets page. This page contains information and links to datasets subscriptions. Task 4 Exploring GOV.Data In this task, you will explore the Gov.Data dataset using the Windows Azure MarketPlace explorer web page. If you have just finished with Task 3 are still signed into Windows Azure MarketPlace you can skip steps 2 and 3. 1. Open Internet Explorer and navigate to http://datamart.azure.com. 2. Click the Sign In link in the right-top corner. 3. Sign in using your Windows Live Id account. 4. Click My Data menu item at the top of the page. 5. Click on DataSets link located in the left-hand navigation. 6. Click on Use link on the left hand side of the DATA.Gov dataset information.

Figure 8 Use Link 1. Review the DataSet information page. This page provides links and information on how to use the dataset including accessing the data using Visual Studio and PowerPivot. 2. Click on Explore this DataSet.

Figure 9 Explore this DataSet Link 1. Enter Washington in the State parameter textbox.

Figure 10 Optional Parameters box 1. Click Run Query link to execute the query. 2. Review the results. Notice the Current query URL value. DataMarket exposes data using Restful APIs.

Figure 11 Current Query URL

Exercise 1 Verification In order to verify that you have correctly performed all steps of exercise 1, proceed as follows:

Verification 1 In this verification, repeat 1. Open Internet Explorer and navigate to http://datamart.azure.com. 2. Click the Sign In link in the right-top corner. 3. Sign in using your Windows Live Id account. 4. Click My Data menu item at the top of the page. 5. Click on DataSets link located in the left-hand navigation. 6. Click on Use link on the left hand side of the DATA.Gov dataset information. 7. Click on Explore this DataSet. 8. Click Run Query link to execute the query. A result without errors verifies your subscription has been created correctly.

Exercise 2: Create a Business Data Catalog Model to Access the Dataset


Task 1 Adding a Service Reference to the DATA.Gov Web Service In this task, you will use Visual Studio 2010 to create a Business Data Catalog model to access the DATA.Gov subscription. 1. Using Visual Studio open the starter solution named TheftStatisticsBDCModel from <Install>\Labs\ACDM\source\begin folder.

Figure 12 Solution Explorer 1. Click on plus icon next to TheftStatisticsDBModel project in the Solution Explorer to expand the project and display the project files.

2. Right-click the References folder 3. Select Add Service Reference to display the Add Service Reference dialog box.

Figure 13 Add Service Reference 1. Enter https://api.datamarket.azure.com/Data.ashx/data.gov/Crimes into the Address field. 2. Click Go. 3. Enter DataGovService as the Namespace.

Figure 14 Add Service reference dialog box 1. Select OK. Task 2 Modifying the Entity1 Class In this task, you will replace the existing Entity1 class with code from a file in the SupportingFiles folder included in the project files. The Entity1 class stores individual row data. Normally you will rename the Entity1 class to a more meaningful class name. 1. In the Solution Explorer, click the plus icon next to BDCModel1 to expand the model. 1. Right-click Entitiy1 and select Open to view it in the code pane. 2. Delete all the code in Entity1 leaving a blank file.

3. Open Entity1.cs from the SupportingFiles folder. 4. Copy the SupportingFiles\Entity1.cs code into the projects Entity1.cs file.

Figure 15 Entity1.cs 1. Review Entity1.cs. Notice that it is a simple entity that stores the basic information used later in the solution. 2. Save and close Entity1.cs Task 3 Modifying the ReadList Method of the Entity1Service Class In this task, you will modify ReadList method the existing Entity1Service class to access the DATA.Gov dataset using the service reference created in Task 1. You will limit the data returned from the dataset to include valid records from the state of Washington for the years 2007 and 2008. The ReadList method is an existing Finder method for the BDCModel1 model. 1. In the Solution Explorer, click the plus icon next to BDCModel1 to expand the model. 2. Right-click Entitiy1Service and select Open to view it in the code pane. 3. Right-click the References folder 4. Select Add Reference to display the Add Reference dialog box. 5. Select WindowsBase. 6. Click OK. 7. Add the following using statements to the class (Snippet 7.1.1)

Figure 16 Using Statements Added

1. Create a private GetProxy method which will create return an instance of the service reference object. (Snippet 7.1.2)

Figure 17 Get Proxy method This method sets the ServerCertificateValidationCallback property to ignore SSL certification errors. You must enter your Windows Live Id account and your subscription Account Key in this method. The Account Key is located in your Account information on your MY Data pages show in Exercise 1. This method will return an instance of the service reference. 1. Locate the ReadList method in EntityService1. 2. Delete the code and comments in the body of the ReadList. 3. Create new Generic List collection to contain our results. (Snippet 7.1.3)

Figure 18 Generic list collection added 1. Retrieve the service reference proxy. (Snippet 7.1.4)

Figure 19 Call Get Proxy method 1. Create a new DataServiceCollection object to query the dataset. Use a While loop and the Continuation object to retrieve all records from the dataset. (Snippet 7.1.5)

Figure 20 New Data Service Collection

Data from the DATAGov dataset is batching at 100 records per call. The DataServiceCollection uses the Continuation object to determine if more data is still available. 1. Create an Entity1 object for each item in the DataQueryCollection and add the new Entity1 object to the queryResults collection created in this task. (Snippet 7.1.6)

Figure 21 Create Entity1 for each item 1. Finally, return the list of Entity1 objects. (Snippet 7.1.7)

Figure 22 Return Entity1 list Task 4 Modifying the ReadItem Method of the Entity1Service Class In this task, you will modify ReadItemt method the existing Entity1Service class to access a specific row of data in the DATA.Gov dataset using the service reference created in Task 1. The ReadItem method is an existing SpecificFinder method for the BDCModel1 model. 1. In the Solution Explorer, click the plus icon next to BDCModel1 to expand the model. 2. Right-click Entitiy1Service and select Open to view it in the code pane. 3. Locate the ReadItem method in EntityService1. 4. Delete the code and comments in the body of the ReadItem method. 5. Change the ReadItems Id parameter from a string to an int data type.

Figure 23

ReadItem parameter change 1. Retrieve the service reference proxy. (Snippet 7.1.8)

Figure 24 Call Get Proxy method 1. Create the query to return a single item from the service. (Snippet 7.1.9)

Figure 25 New Query 1. Return the new Entity1 object (Snippet 7.1.11)

Figure 27 Return Entity1 object 1. Create a new Entity1 object and copy the query result into the Entity1 item. (Snippet 7.1.10)

Figure 26 New Entity1 1. Save and close the Entity1Service.cs file.

Task 5 Updating the Models Type Descriptors In this task, you will open the model in the BDC Explorer and modify the associated type descriptors to match our new Entity1 class. 1. In the Solution Explorer, right-click on the BdcModel1.bdcm file and select Open. This will open the model in the designer and display the BDC Explorer tab.

Figure 28 BDC Explorer Tab 1. Expand the nodes in the BDC Explorer tab to access the ReadItems Identifier1 type descriptor.

Figure 29 identifier 1 type descriptor 1. Using the property pane, change the Identifier1s data type from System.String to System.Int32

Figure 30 Property pane - Type name

1. Expand the BDC Explorer nodes to access the ReadItems returnParamter node and select the Identifier1 type descriptor 2. Using the property pane, change the Identifier1s Data Type property from System.String to System.Int32. 3. Right-click on the Message type descriptor and select delete. 4. Right-click on the returnParamters Entity1 node and select Add Type Descriptor. 5. Using the property panel change the Name property of the new type descriptor to City and the Data Type property to System.String. 6. Add six more Type Descriptors to the Entity1 node. Set the properties to:

Type Descriptor Name Burglary LarcenyTheft MotorVehicleTheft Population State Year

Type Descriptor Data Type System.Int32 System.Int32 System.Int32 System.Int32 String System.Int32

1. The Entity1 type descriptor should now look like the following image:

Figure 31 Entity1 type descriptor 1. Repeat steps 4-12 for the Entity1 type descriptor associated with ReadList.

Figure 32 Entity1 type descriptor 1. In the design pane, select Identifier1.

Figure 33 Design Pane - Entity1 1. Using the property pane set the Identifier1 Data Type property to System.Int32. 2. Save the project and the solution Task 6 Adding the SiteUrl Property to the Features Element File In this task, you will open the TheftStatisticsBDCModel feature and add the SiteUrl property to the elements file. Without this property the feature will not deploy. 1. In the Solution Explorer, click the plus icon next to Features folder to expand the Feature node

Figure 34 Features Folder 1. Right-click TheftStatisticsBDCModel.feature and click Open to open the Feature designer.

Figure 35 Open Feature Designer 1. Click the Manifest link located towards the bottom of the designer to open the manifest.

Figure 36 Manifest Link 1. Click the plus icon next to Edit Options to expand the manifest editing panel

Figure 37 Expand Manifest editing panel 1. Add the SiteUrl property into the features manifest file.

Figure 38 Site URL on features manifest 1. Save and close the feature. Task 7 Modifying the Models Permission in Central Administration In this task, you will build and deploy the project. Once the project is deployed, you will modify the permissions on the model in Central Administration to allow all authenticated users to view the data. 1. With the solution open in Visual Studio right-click the solution and select Deploy Solution to build and deploy the model. Note, if you use F5 Deployment the BDC model will retract and not be available when Visual Studio is done debugging.

2. Using Internet Explorer, navigate to the Central Administration home page located at http://demo2010a:2010/default.aspx. 3. Click on Manage service applications link located in the Application Management section.

Figure 39 Manage Service Applications link 1. Click on Business Data Connectivity Service link.

Figure 40 Business Data Connectivity Service lin 1. Hover over Entity1 and select Set Permissions from the drop down menu.

Figure 41 Set permissions Link 1. Click the Browse icon to display the Select People and Groups dialog.

Figure 42 Select People and Groups 1. Select All Users in the left hand side of the dialog and then All Authenticated Users from the right-hand side of the dialog.

Figure 43 Users dialog box 1. Click Add to add the users. 2. Click OK to close the dialog. 3. Click Add to add the All Authenticated Users to the permissions list of the model 4. With All Authenticated Users highlighted, click the Execute permission checkbox to give the users the ability to view the data.

Figure 44 Add permissions for all authenticated users 1. Click OK.

Exercise 3: Create an External List to Consume the MarketPlace Dataset


Task 1 Creating an External List In this task, you will use Internet Explorer to navigate to Windows Azure Marketplace and register for a Marketplace account. 1. Using Internet Explorer, navigate to http://intranet.contoso.com. 2. Click on Site Actions in the upper left corner. 3. Select More Options menu item.

Figure 45 More Options Link 1. Select List and Data items in the left hand pane.

Figure 46 Create Dialog Box 1. Select External List item and click the Create button on the right hand side of the dialog. 2. Enter a name of DataGov in the name textbox. 3. Click the Select External Content Type icon in the Data source configuration section.

Figure 47 External Content Type 1. Select BDCModel1 and click OK.

Figure 48 BDCModel1 External Content Type 1. Click Create to create the external list. 2. Review the new external list.

Exercise 3 Verification In order to verify that you have correctly performed all steps of exercise 1, proceed as follows: Verification 1 In this verification, you will view the list and select a single list item to view. 1. Using Internet Explorer, navigate to http://intranet.contoso.com/Lists/DataGov/ReadList.aspx. 2. Verify the list loads without error. 3. Click on a City value. The item dialog box should appear displaying all the data for the item.

Exercise 4: Create a Web Part to Display the MarketPlace Data


Task 1 Opening and Review the Starter Solution In this task you will open the Web Part starter solution and review the existing code 1. Using Visual Studio, open the starter solution named TheftStatisticsWebPart from <Install>\Labs\ACDM\source\begin folder.

Figure 49 Solution Explorer 1. Review the projects and code in the solution. The TheftStatisticsWebPart solution was created using the Silverlight Web Part project template. Two projects are created, one SharePoint project and a Silverlight Application project. The lab will focus on the Silverlight Application. All of the files needed for the application exist in the starter solution. 2. Click on the plus sign associated with the ViewModels folder to expand the folder contents. 3. Review the code in CrimeStat class. This class is used to store individual results from a search. 4. Right-click on CrimeStatsViewModel.cs and select Open. The view model included the necessary using statements, service reference to the Bing Geocode service and the asynchronous code to geocode our results. Task 2 Adding the Silverlight Client Side Object Model References In this task, you will add the needed references to the two required Silverlight Client Side Object Model assemblies. 1. In Solution Explorer, right-click the References folder located in the TheftStatisticsApplication project. 2. Select Add Reference to display the Add Reference dialog box. 3. Select the Browse tab. 4. Navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ClientBin. 5. Select both Silverlight assemblies.

Figure 50 Add Reference dialog box 1. Click OK to add the assembly references to the project Task 3 Completing the Existing View Model In this task, you will complete the existing view model. The CrimeStatsViewModel class will asynchronously query the external list, geocode the results and add the results to an ObservableCollection for data binding. 1. Right-click CrimeStatsViewModel.cs in the Solution Explorer pane and select Open. 2. Add a public collection of TheftStatistic objects used for data binding. (Snippet 7.1.12)

Figure 51 Add public TheftStatistic collection 1. Add a public TheftStatisitc property named CurrentStatistic to contain the currently selected TheftStatistic. This property will raise the OnPropertyChange event. (Snippet 7.1.13)

Figure 52 Add public TheftStatisitc property 1. Add a public method to find the current TheftStatistic from the collection and set the CurrentStatistic property. (Snippet 7.1.14)

Figure 53 Create SetCurrentStatistic method 1. Add a private collection of TheftStatistic objects for temporary storage of the results returned from the Client Side Object Model query. This collection will not be data bound to the user interface. (Snippet 7.1.15)

Figure 54 Add private TheftStatistic collection 1. Add a variable named bcslist of type IEnumerable< ListItem>. (Snippet 7.1.16)

Figure 55 Add bcsList variable 1. Create a method named GetTheftStats. This method clears the databound collection and sets up the successful callback reference to process the results. The GetTheftStats method uses Client Side Object Mode and a CAML query to retrieve only year values of 2008 from the external list. (Snippet 7.1.17)

Figure 56 Create GetTheftStats method 1. Create the successful callback method to process the query results. The successful callback creates a TheftStatistic object for each result and adds it to the temporary storage collection. Once all the TheftStatistic objects have been added to the collection, each object is passed to the Geocode method. (Snippet 7.1.18)

Figure 57 Create QueryCallback method 1. Review the existing Geocode method. This method dispatches the calls to the UI thread to access the Bing map control in the UI to retrieve the map credentials. It then creates an asynchronous call to the Geocode service passing in the TheftStatistics State, City and Id values. The Id value is required in the callback method for retrieval of the correct object for update. 2. Review and modify the existing geocodeService_GeocodeCompleted method. This method is called once per item geocoded. It retrieves the id of the object that was associated with the City and State values, selects the item from the temporary storage collection and updates the Location property. The selected item is added to the data bound TheftStatistics collection Replace the //Add code here comment located in the existing geocodeService_GeocodeCompleted with the lines displayed below (Snippet 7.1.19)

Figure 58 Review and modify geocodeService_GeocodeCompleted method 1. Add a private class variable named _view of type MainPage. This will be our connection back to the MainPage (view). (Snippet 7.1.20) 2. Create the CrimeStatsViewModel constructor. The constructor requires a parameter for the view reference. The constructor will initialize our collections and call GetTheftStats to populate our databound collection. (Snippet 7.1.21)

Figure 59 Create CrimeStatsViewModel constructor 1. Save and close CrimeStatsViewModel.cs. Task 4 Replacing and Review the MainPage Xaml Markup In this task, you will replace and review the MainPage.xaml markup with markup from the SupportingFiles folder. 1. Right-click MainPage.xaml in the Solution Explorer pane and select Open. 2. Open the SupportingFiles folder located in the starter solution and open MainPage.xaml.txt file. 3. Copy the text in the MainPage.xaml.txt files and pasted it over the existing MainPage.xaml markup. 4. Locate the Map control and enter your specific Bing map key as the CredentialsProvider attribute value. 5. Review the MainPage.xaml markup. Notice that the markup includes a Map control named CrimeMap. The Map control contains a MapItemsControl which references the static resource named Pushpin. The DataTemplate is bound to the view models TheftStatistics collection. The PushPin control defines the MouseEnter and MouseLeave event handlers that are defined in the code beside. 6. The Map control also defines a MapLayer control that is used to display the popup that is bound to the view models CurrentStatistic property. 7. Save and close MainPage.xaml.

Task 5 Completing the Existing MainPage.Xaml.cs Code Beside In this task, you will complete the existing MainPage.xaml.cs code beside page. The code will manage the controls events and set the datacontext. 1. In Solution Explorer, right-click MainPage.xaml and select View Code. 2. Delete the commented code. 3. Add the following using statement to MainPage.xaml.cs (Snippet 7.1.22) :

Figure 60 Add using statement 1. Add a variable used to reference the view model. (Snippet 7.1.23) Figure 61 Add viewModel Variable 1. Modify the existing constructor to initialize the viewModel variable and set the DataContext to the view model reference. (Snippet 7.1.24)

Figure 62 Modify MainPage method 1. Add the PushPins MouseEnter handler. This method retrieves the PushPins tag property that contains the associated TheftStatistics id and call the view models SetCurrentStatistic property. The rest of the method sets the layers location and visibility. (Snippet 7.1.25)

Figure 63 Add the PushPins MouseEnter handler 1. Add the PushPins MouseLeave handler. This method will hide the map layer. (Snippet 7.1.26)

Figure 64 Add the PushPins MouseLeave handler

Exercise 4 Verification In order to verify that you have correctly performed all steps of exercise 1, proceed as follows: Verification 1 In this verification, you will build the Silverlight Web Part and Silverlight application. A successful build will verify the exercise. 1. In the Solution Explorer, right-click the TheftStatisticsWebPart solution. 2. Click Build Solution.

Exercise 5: Deploy the Web Part


Task 1 Deploying the Solution In this task, you will deploy the Web Part. 1. Using Solution Explorer right-click on TheftStatisticsWebPart solution and select Deploy. 2. After the solution has deployed, open Internet Explorer and navigate to http://intranet.contoso.com. 3. Click the Edit icon in the top left corner of the home page.

Figure 65 Edit button 1. Click the Insert Ribbon tab.

Figure 66 Insert Tab 1. With the cursor located as shown in image below, click the Web Part button.

Figure 67 Web Part Button 1. Select Custom located in the Categories pane and Theft Statistics in the Web Part pane.

Figure 68 Web Part Pane 1. Click Add to add the Web Part to the Rich Content control. 2. The Web Part will display in the Rich Content control.

Figure 69 Theft Statistics Web Part 1. Click the Save icon to save the new page configuration.

Figure 70 Save Button 1. Move the mouse over a PushPin to display the ThreatStatistic details

Figure 71

ThreatStatistic details

Summary
In this lab you have seen how to set up a Windows Azure MarketPlace account and how to subscribe and access a dataset. This dataset was consumed by a Business Data Catalog model using an external list. You saw how to use the Client Side Object Model to consume data from an external list and display it in a Bing Map.

Anda mungkin juga menyukai