Skip to content

Commit e5a355b

Browse files
committed
Final batch of fixes for VS articles, US 1235784.
1 parent 0575b05 commit e5a355b

7 files changed

+246
-246
lines changed

docs/data-tools/walkthrough-creating-a-simple-wcf-service-in-windows-forms.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ ms.technology: vs-data-tools
1919
ms.workload:
2020
- "data-storage"
2121
---
22-
# Walkthrough: Creating a simple WCF Service in Windows Forms
22+
# Walkthrough: Create a simple WCF Service in Windows Forms
2323
This walkthrough demonstrates how to create a simple [!INCLUDE[vsindigo](../data-tools/includes/vsindigo_md.md)] service, test it, and then access it from a Windows Forms application.
2424

2525
[!INCLUDE[note_settings_general](../data-tools/includes/note_settings_general_md.md)]
2626

27-
## Creating the Service
27+
## Create the Service
2828

29-
#### To create a WCF service
29+
### To create a WCF service
3030

3131
1. On the **File** menu, point to **New** and then click **Project**.
3232

@@ -63,9 +63,9 @@ This walkthrough demonstrates how to create a simple [!INCLUDE[vsindigo](../data
6363
[!code-csharp[WCFWalkthrough#2](../data-tools/codesnippet/CSharp/walkthrough-creating-a-simple-wcf-service-in-windows-forms_4.cs)]
6464
[!code-vb[WCFWalkthrough#2](../data-tools/codesnippet/VisualBasic/walkthrough-creating-a-simple-wcf-service-in-windows-forms_4.vb)]
6565

66-
## Testing the Service
66+
## Test the Service
6767

68-
#### To test a WCF service
68+
### To test a WCF service
6969

7070
1. Press **F5** to run the service. A **WCF Test Client** form will be displayed and it will load the service.
7171

@@ -83,9 +83,9 @@ This walkthrough demonstrates how to create a simple [!INCLUDE[vsindigo](../data
8383

8484
5. On the **File** menu, click **Exit** to close the test form.
8585

86-
## Accessing the Service
86+
## Access the Service
8787

88-
#### To reference a WCF service
88+
### To reference a WCF service
8989

9090
1. On the **File** menu, point to **Add** and then click **New Project**.
9191

@@ -103,7 +103,7 @@ This walkthrough demonstrates how to create a simple [!INCLUDE[vsindigo](../data
103103

104104
5. Click **OK** to add the service reference.
105105

106-
#### To build a client application
106+
### To build a client application
107107

108108
1. In **Solution Explorer**, double-click **Form1.vb** or **Form1.cs** to open the Windows Forms Designer if it is not already open.
109109

docs/data-tools/walkthrough-creating-a-wcf-data-service-with-wpf-and-entity-framework.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ ms.workload:
2222
# Walkthrough: Creating a WCF Data Service with WPF and Entity Framework
2323
This walkthrough demonstrates how to create a simple [!INCLUDE[ss_data_service](../data-tools/includes/ss_data_service_md.md)] that is hosted in an [!INCLUDE[vstecasp](../code-quality/includes/vstecasp_md.md)] Web application and then access it from a Windows Forms application.
2424

25-
In this walkthrough you will:
25+
In this walkthrough you:
2626

2727
- Create a Web application to host a [!INCLUDE[ss_data_service](../data-tools/includes/ss_data_service_md.md)].
2828

29-
- Create an [!INCLUDE[adonet_edm](../data-tools/includes/adonet_edm_md.md)] that represents the Customers table in the Northwind database.
29+
- Create an [!INCLUDE[adonet_edm](../data-tools/includes/adonet_edm_md.md)] that represents the `Customers` table in the Northwind database.
3030

3131
- Create a [!INCLUDE[ss_data_service](../data-tools/includes/ss_data_service_md.md)].
3232

@@ -39,42 +39,42 @@ In this walkthrough you will:
3939
## Prerequisites
4040
This walkthrough uses SQL Server Express LocalDB and the Northwind sample database.
4141

42-
1. If you don't have SQL Server Express LocalDB, install it either from the [SQL Server Express download page](https://www.microsoft.com/sql-server/sql-server-editions-express), or through the **Visual Studio Installer**. In the Visual Studio Installer, SQL Server Express LocalDB can be installed as part of the **Data storage and processing** workload, or as an individual component.
42+
1. If you don't have SQL Server Express LocalDB, install it either from the [SQL Server Express download page](https://www.microsoft.com/sql-server/sql-server-editions-express), or through the **Visual Studio Installer**. In the **Visual Studio Installer**, you can install SQL Server Express LocalDB as part of the **Data storage and processing** workload, or as an individual component.
4343

4444
2. Install the Northwind sample database by following these steps:
4545

46-
1. In Visual Studio, open the **SQL Server Object Explorer** window. (SQL Server Object Explorer is installed as part of the **Data storage and processing** workload in the Visual Studio Installer.) Expand the **SQL Server** node. Right-click on your LocalDB instance and select **New Query**.
46+
1. In Visual Studio, open the **SQL Server Object Explorer** window. (**SQL Server Object Explorer** is installed as part of the **Data storage and processing** workload in the Visual Studio Installer.) Expand the **SQL Server** node. Right-click on your LocalDB instance and select **New Query**.
4747

4848
A query editor window opens.
4949

5050
2. Copy the [Northwind Transact-SQL script](https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/data-tools/samples/northwind.sql?raw=true) to your clipboard. This T-SQL script creates the Northwind database from scratch and populates it with data.
5151

5252
3. Paste the T-SQL script into the query editor, and then choose the **Execute** button.
5353

54-
After a short time, the query finishes executing and the Northwind database is created.
54+
After a short time, the query finishes running and the Northwind database is created.
5555

5656
## Creating the Service
5757
To create a [!INCLUDE[ss_data_service](../data-tools/includes/ss_data_service_md.md)], you will add a Web project, create an [!INCLUDE[adonet_edm](../data-tools/includes/adonet_edm_md.md)], and then create the service from the model.
5858

59-
In the first step, you will add a Web project to host the service.
59+
In the first step, you add a Web project to host the service.
6060

6161
[!INCLUDE[note_settings_general](../data-tools/includes/note_settings_general_md.md)]
6262

6363
#### To create the Web project
6464

65-
1. On the menu bar, choose **File**, **New**, **Project**.
65+
1. On the menu bar, choose **File** > **New** > **Project**.
6666

6767
2. In the **New Project** dialog box, expand the **Visual Basic** or **Visual C#** and **Web** nodes, and then choose the **ASP.NET Web Application** template.
6868

6969
3. In the **Name** text box, enter **NorthwindWeb**, and then choose the **OK** button.
7070

7171
4. In the **New ASP.NET Project** dialog box, in the **Select a template** list, choose **Empty**, and then choose the **OK** button.
7272

73-
In the next step, you will create an [!INCLUDE[adonet_edm](../data-tools/includes/adonet_edm_md.md)] that represents the Customers table in the Northwind database.
73+
In the next step, you create an [!INCLUDE[adonet_edm](../data-tools/includes/adonet_edm_md.md)] that represents the `Customers` table in the Northwind database.
7474

7575
#### To create the Entity Data Model
7676

77-
1. On the menu bar, choose **Project**, **Add New Item**.
77+
1. On the menu bar, choose **Project** > **Add New Item**.
7878

7979
2. In the **Add New Item** dialog box, choose the **Data** node, and then choose the **ADO.NET Entity Data Model** item.
8080

@@ -104,19 +104,19 @@ In the next step, you will create an [!INCLUDE[adonet_edm](../data-tools/include
104104
105105
8. On the **Choose Your Database Objects** page, expand the **Tables** node, select the **Customers** check box, and then choose the **Finish** button.
106106

107-
The entity model diagram will be displayed, and a NorthwindModel.edmx file will be added to your project.
107+
The entity model diagram displays, and a *NorthwindModel.edmx* file is added to your project.
108108

109-
In the next step, you will create and test the data service.
109+
In the next step, you create and test the data service.
110110

111111
#### To create the data service
112112

113-
1. On the menu bar, choose **Project**, **Add New Item**.
113+
1. On the menu bar, choose **Project** > **Add New Item**.
114114

115115
2. In the **Add New Item** dialog box, choose the **Web** node, and then choose the **WCF Data Service 5.6** item.
116116

117117
3. In the **Name** text box, enter `NorthwindCustomers`, and then choose the **Add** button.
118118

119-
The NorthwindCustomers.svc file appears in the **Code Editor**.
119+
The **NorthwindCustomers.svc** file appears in the **Code Editor**.
120120

121121
4. In the **Code Editor**, locate the first `TODO:` comment and replace the code with the following:
122122

@@ -128,53 +128,53 @@ In the next step, you will create and test the data service.
128128
[!code-vb[WCFDataServiceWalkthrough#2](../data-tools/codesnippet/VisualBasic/walkthrough-creating-a-wcf-data-service-with-wpf-and-entity-framework_2.vb)]
129129
[!code-csharp[WCFDataServiceWalkthrough#2](../data-tools/codesnippet/CSharp/walkthrough-creating-a-wcf-data-service-with-wpf-and-entity-framework_2.cs)]
130130

131-
6. On the menu bar, choose **Debug**, **Start Without Debugging** to run the service. A browser window opens and the XML schema for the service is displayed.
131+
6. On the menu bar, choose **Debug** > **Start Without Debugging** to run the service. A browser window opens and the XML schema for the service displays.
132132

133-
7. In the **Address** bar, enter `Customers` at the end of the URL for NorthwindCustomers.svc, and then choose the **ENTER** key.
133+
7. In the **Address** bar, enter `Customers` at the end of the URL for **NorthwindCustomers.svc**, and then choose the **Enter** key.
134134

135-
An XML representation of the data in the Customers table is displayed.
135+
An XML representation of the data in the `Customers` table appears.
136136

137137
> [!NOTE]
138-
> In some cases, Internet Explorer will misinterpret the data as an RSS feed. You must make sure that the option to display RSS feeds is disabled. For more information, see [Troubleshooting Service References](../data-tools/troubleshooting-service-references.md).
138+
> In some cases, Internet Explorer will misinterpret the data as an RSS feed. You must make sure that the option to display RSS feeds is disabled. For more information, see [Troubleshooting service references](../data-tools/troubleshooting-service-references.md).
139139
140140
8. Close the browser window.
141141

142-
In the next steps, you will create a Windows Forms client application to consume the service.
142+
In the next steps, you create a Windows Forms client application to consume the service.
143143

144144
## Creating the Client Application
145-
To create the client application, you will add a second project, add a service reference to the project, configure a data source, and create a user interface to display the data from the service.
145+
To create the client application, you add a second project, add a service reference to the project, configure a data source, and create a user interface to display the data from the service.
146146

147-
In the first step, you will add a Windows Forms project to the solution and set it as the startup project.
147+
In the first step, you add a Windows Forms project to the solution and set it as the startup project.
148148

149149
#### To create the client application
150150

151151
1. On the menu bar, choose File, **Add** > **New Project**.
152152

153-
2. In the **New Project** dialog box, expand the **Visual Basic** or **Visual C#** node and choose the **Windows** node, and then choose **Windows Forms Application**.
153+
2. In the **New Project** dialog box, expand the **Visual Basic** or **Visual C#** node, choose the **Windows** node, and then choose **Windows Forms Application**.
154154

155155
3. In the **Name** text box, enter `NorthwindClient`, and then choose the **OK** button.
156156

157157
4. In **Solution Explorer**, choose the **NorthwindClient** project node.
158158

159159
5. On the menu bar, choose **Project**, **Set as StartUp Project**.
160160

161-
In the next step, you will add a service reference to the [!INCLUDE[ss_data_service](../data-tools/includes/ss_data_service_md.md)] in the Web project.
161+
In the next step, you add a service reference to the [!INCLUDE[ss_data_service](../data-tools/includes/ss_data_service_md.md)] in the Web project.
162162

163163
#### To add a service reference
164164

165-
1. On the menu bar, choose **Project**, **Add Service Reference**.
165+
1. On the menu bar, choose **Project** > **Add Service Reference**.
166166

167167
2. In the **Add Service Reference** dialog box, choose the **Discover** button.
168168

169169
The URL for the NorthwindCustomers service appears in the **Address** field.
170170

171171
3. Choose the **OK** button to add the service reference.
172172

173-
In the next step, you will configure a data source to enable data binding to the service.
173+
In the next step, you configure a data source to enable data binding to the service.
174174

175175
#### To enable data binding to the service
176176

177-
1. On the menu bar, choose **View**, **Other Windows**, **Data Sources**.
177+
1. On the menu bar, choose **View** > **Other Windows** > **Data Sources**.
178178

179179
2. In the **Data Sources** window, choose the **Add New Data Source** button.
180180

@@ -184,7 +184,7 @@ In the next step, you will configure a data source to enable data binding to the
184184

185185
5. Select **Customer** check box, and then choose the **Finish** button.
186186

187-
In the next step, you will create the user interface that will display the data from the service.
187+
In the next step, you create the user interface that displays the data from the service.
188188

189189
#### To create the user interface
190190

@@ -196,7 +196,7 @@ In the next step, you will create the user interface that will display the data
196196

197197
3. Choose the **CustomersDataGridView** control, and then in the **Properties** window set the **Dock** property to **Fill**.
198198

199-
4. In **Solution Explorer**, open the shortcut menu for the **Form1** node and choose **View Code** to open the Code Editor, and add the following Imports or Using statement at the top of the file:
199+
4. In **Solution Explorer**, open the shortcut menu for the **Form1** node and choose **View Code** to open the Code Editor, and add the following `Imports` or `Using` statement at the top of the file:
200200

201201
```vb
202202
Imports NorthwindClient.ServiceReference1
@@ -225,28 +225,28 @@ In the next step, you will create the user interface that will display the data
225225

226226
```
227227

228-
6. In **Solution Explorer**, open the shortcut menu for the NorthwindCustomers.svc file and choose **View in Browser**. Internet Explorer opens and the XML schema for the service is displayed.
228+
6. In **Solution Explorer**, open the shortcut menu for the **NorthwindCustomers.svc** file and choose **View in Browser**. Internet Explorer opens and the XML schema for the service displays.
229229

230230
7. Copy the URL from the Internet Explorer address bar.
231231

232232
8. In the code that you added in step 4, select `http://localhost:53161/NorthwindCustomers.svc/` and replace it with the URL that you just copied.
233233

234-
9. On the menu bar, choose **Debug**, **Start Debugging** to run the application. The customer information is displayed.
234+
9. On the menu bar, choose **Debug** > **Start Debugging** to run the application. The customer information is shown.
235235

236236
You now have a working application that displays a list of customers from the NorthwindCustomers service. If you want to expose additional data through the service, you can modify the [!INCLUDE[adonet_edm](../data-tools/includes/adonet_edm_md.md)] to include additional tables from the Northwind database.
237237

238-
In the next optional step, you will learn how to filter the data that is returned by the service.
238+
In the next optional step, you learn how to filter the data that is returned by the service.
239239

240240
## Adding Filtering Capabilities
241-
In this step, you will customize the application to filter the data by the customer's city.
241+
In this step, you customize the application to filter the data by the customer's city.
242242

243243
#### To add filtering by city
244244

245245
1. In **Solution Explorer**, open the shortcut menu for the **Form1.vb** or **Form1.cs** node and choose **Open**.
246246

247247
2. Add a <xref:System.Windows.Forms.TextBox> control and a <xref:System.Windows.Forms.Button> control from the **Toolbox** to the form.
248248

249-
3. Open the shortcut menu for the <xref:System.Windows.Forms.Button> control, and choose **View Code**, and then add the following code in the `Button1_Click` event handler:
249+
3. Open the shortcut menu for the <xref:System.Windows.Forms.Button> control, choose **View Code**, and then add the following code in the `Button1_Click` event handler:
250250

251251
```vb
252252
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
@@ -277,11 +277,11 @@ In the next optional step, you will learn how to filter the data that is returne
277277

278278
4. In the previous code, replace `http://localhost:53161/NorthwindCustomers.svc` with the URL from the `Form1_Load` event handler.
279279

280-
5. On the menu bar, choose **Debug**, **Start Debugging** to run the application.
280+
5. On the menu bar, choose **Debug** > **Start Debugging** to run the application.
281281

282282
6. In the text box, enter **London**, and then choose the button. Only the customers from London are displayed.
283283

284284
## See also
285285

286286
- [Windows Communication Foundation Services and WCF Data Services in Visual Studio](../data-tools/windows-communication-foundation-services-and-wcf-data-services-in-visual-studio.md)
287-
- [How to: Add, Update, or Remove a WCF Data Service Reference](../data-tools/how-to-add-update-or-remove-a-wcf-data-service-reference.md)
287+
- [How to: Add, update, or remove a WCF Data Service reference](../data-tools/how-to-add-update-or-remove-a-wcf-data-service-reference.md)

0 commit comments

Comments
 (0)