Skip to content

Commit 22680c2

Browse files
authored
Merge branch 'master' into v-elicas062718
2 parents ab963ec + 9152b8e commit 22680c2

File tree

111 files changed

+569
-559
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+569
-559
lines changed

docs/code-quality/in-source-suppression-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In C++/CLI, use the macros CA\_SUPPRESS\_MESSAGE or CA\_GLOBAL\_SUPPRESS_MESSAGE
2929
> You should not use in-source suppressions on release builds, to prevent shipping the in-source suppression metadata accidentally. Additionally, because of the processing cost of in-source suppression, the performance of your application can be degraded.
3030
3131
> [!NOTE]
32-
> If you migrate a project to Visual Studio 2017, you might suddenly be faced with an overwhelming number of code analysis warnings. If you aren't ready to fix the warnings and want to temporarily turn code analysis off, open the project's property pages (**Project** > ***project* Properties...**) and go to the **Code Analysis** tab. Deselect **Enable Code Analysis on Build**, and then rebuild your project. Alternatively, you can select a different, smaller rule set to run against the code. Remember to turn code analysis back on when you are ready to fix the warnings.
32+
> If you migrate a project to Visual Studio 2017, you might suddenly be faced with an overwhelming number of code analysis warnings. If you aren't ready to fix the warnings and want to temporarily turn code analysis off, open the project's property pages (**Project** > **\<project> Properties**) and go to the **Code Analysis** tab. Deselect **Enable Code Analysis on Build**, and then rebuild your project. Alternatively, you can select a different, smaller rule set to run against the code. Remember to turn code analysis back on when you are ready to fix the warnings.
3333
3434
## SuppressMessage attribute
3535

docs/code-quality/walkthrough-analyzing-managed-code-for-code-defects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This walkthrough steps you through the process of using code analysis to analyze
2323

2424
### To create a class library
2525

26-
1. On the **File** menu, choose **New** > **Project...**.
26+
1. On the **File** menu, choose **New** > **Project**.
2727

2828
1. In the **New Project** dialog box, expand **Installed** > **Visual C#**, and then choose **Windows Desktop**.
2929

docs/data-tools/create-a-simple-data-application-with-wpf-and-entity-framework-6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This example uses SQL Server Express LocalDB and the Northwind sample database.
2626

2727
2. Install the Northwind sample database by following these steps:
2828

29-
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...**.
29+
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**.
3030

3131
A query editor window opens.
3232

docs/data-tools/handle-a-concurrency-exception.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ This walkthrough uses SQL Server Express LocalDB and the Northwind sample databa
6565

6666
#### To create a new Windows Forms application project
6767

68-
1. In Visual Studio, on the **File** menu, select **New**, **Project**.
68+
1. In Visual Studio, on the **File** menu, select **New** > **Project**.
6969

7070
2. Expand either **Visual C#** or **Visual Basic** in the left-hand pane, then select **Windows Desktop**.
7171

docs/data-tools/how-to-add-update-or-remove-a-wcf-data-service-reference.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ ms.technology: vs-data-tools
1717
ms.workload:
1818
- "data-storage"
1919
---
20-
# How to: Add, Update, or Remove a WCF Data Service Reference
20+
# How to: Add, update, or remove a WCF data service reference
2121
A *service reference* enables a project to access one or more [!INCLUDE[ssAstoria](../data-tools/includes/ssastoria_md.md)]. Use the **Add Service Reference** dialog box to search for [!INCLUDE[ssAstoria](../data-tools/includes/ssastoria_md.md)] in the current solution, locally, on a local area network, or on the Internet.
2222

2323
[!INCLUDE[note_settings_general](../data-tools/includes/note_settings_general_md.md)]
2424

25-
## Adding a Service Reference
25+
## Add a service reference
2626

27-
#### To add a reference to an external service
27+
### To add a reference to an external service
2828

29-
1. In **Solution Explorer**, right-click the name of the project that you want to add the service to, and then click **Add Service Reference**.
29+
1. In **Solution Explorer**, right-click the name of the project to which you want to add the service, and then click **Add Service Reference**.
3030

3131
The **Add Service Reference** dialog box appears.
3232

@@ -37,19 +37,19 @@ A *service reference* enables a project to access one or more [!INCLUDE[ssAstori
3737
3838
You can also select the URL from the **Address** list, which stores the previous 15 URLs at which valid service metadata was found.
3939

40-
A progress bar is displayed when the search is being performed. You can stop the search at any time by clicking **Stop**.
40+
A progress bar displays when the search is being performed. You can stop the search at any time by clicking **Stop**.
4141

4242
3. In the **Services** list, expand the node for the service that you want to use and select an entity set.
4343

4444
4. In the **Namespace** box, enter the namespace that you want to use for the reference.
4545

4646
5. Click **OK** to add the reference to the project.
4747

48-
A service client (proxy) is generated, and metadata that describes the service is added to the app.config file.
48+
A service client (proxy) is generated, and metadata that describes the service is added to the *app.config* file.
4949

50-
#### To add a reference to a service in the current solution
50+
### To add a reference to a service in the current solution
5151

52-
1. In **Solution Explorer**, right-click the name of the project that you want to add the service to, and then click **Add Service Reference**.
52+
1. In **Solution Explorer**, right-click the name of the project to which you want to add the service, and then click **Add Service Reference**.
5353

5454
The **Add Service Reference** dialog box appears.
5555

@@ -63,29 +63,29 @@ A *service reference* enables a project to access one or more [!INCLUDE[ssAstori
6363

6464
5. Click **OK** to add the reference to the project.
6565

66-
A service client (proxy) is generated, and metadata that describes the service is added to the app.config file.
66+
A service client (proxy) generates, and metadata that describes the service is added to the *app.config* file.
6767

68-
## Updating a Service Reference
69-
The Entity Data Model for a [!INCLUDE[ssAstoria](../data-tools/includes/ssastoria_md.md)] will sometimes change. When this happens, the service reference must be updated.
68+
## Update a service reference
69+
The Entity Data Model for a [!INCLUDE[ssAstoria](../data-tools/includes/ssastoria_md.md)] sometimes changes. When this happens, you must update the service reference.
7070

71-
#### To update a service reference
71+
### To update a service reference
7272

7373
- In **Solution Explorer**, right-click the service reference and then click **Update Service Reference**.
7474

75-
A progress dialog box is displayed while the reference is updated from its original location, and the service client is regenerated to reflect any changes in the metadata.
75+
A progress dialog box displays while the reference is updated from its original location, and the service client is regenerated to reflect any changes in the metadata.
7676

77-
## Removing a Service Reference
77+
## Remove a service reference
7878
If a service reference is no longer being used, you can remove it from your solution.
7979

80-
#### To remove a service reference
80+
### To remove a service reference
8181

8282
- In **Solution Explorer**, right-click the service reference and then click **Delete**.
8383

84-
The service client will be removed from the solution, and the metadata that describes the service will be removed from the app.config file.
84+
The service client will be removed from the solution, and the metadata that describes the service will be removed from the *app.config* file.
8585

8686
> [!NOTE]
87-
> Any code that references the service reference will have to be removed manually.
87+
> Any code that references the service reference must be removed manually.
8888
8989
## See also
9090

91-
- [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)
91+
- [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)

docs/data-tools/how-to-add-validation-to-entity-classes.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ ms.workload:
1717
# How to: Add validation to entity classes
1818
*Validating* entity classes is the process of confirming that the values entered into data objects comply with the constraints in an object's schema, and also to the rules established for the application. Validating data before you send updates to the underlying database is a good practice that reduces errors. It also reduces the potential number of round trips between an application and the database.
1919

20-
The [LINQ to SQL Tools in Visual Studio](../data-tools/linq-to-sql-tools-in-visual-studio2.md) provides partial methods that enable users to extend the designer-generated code that runs during Inserts, Updates, and Deletes of complete entities, and also during and after individual column changes.
20+
The [LINQ to SQL tools in Visual Studio](../data-tools/linq-to-sql-tools-in-visual-studio2.md) provides partial methods that enable users to extend the designer-generated code that runs during Inserts, Updates, and Deletes of complete entities, and also during and after individual column changes.
2121

2222
> [!NOTE]
23-
> This topic provides the basic steps for adding validation to entity classes by using the [!INCLUDE[vs_ordesigner_short](../data-tools/includes/vs_ordesigner_short_md.md)]. Because it might be difficult to follow these generic steps without referring to a specific entity class, a walkthrough that uses actual data has been provided.
23+
> This topic provides the basic steps for adding validation to entity classes by using the **O/R Designer**. Because it might be difficult to follow these generic steps without referring to a specific entity class, a walkthrough that uses actual data is provided.
2424
25-
## Adding Validation for Changes to the Value in a Specific Column
26-
This procedure shows how to validate data when the value in a column changes. Because the validation is performed inside the class definition (instead of in the user interface) an exception is thrown if the value causes validation to fail. Implement error handling for the code in your application that attempts to change the column values.
25+
## Add validation for changes to the value in a specific column
26+
This procedure shows how to validate data when the value in a column changes. Because the validation is performed inside the class definition (instead of in the user interface), an exception is thrown if the value causes validation to fail. Implement error handling for the code in your application that attempts to change the column values.
2727

2828
[!INCLUDE[note_settings_general](../data-tools/includes/note_settings_general_md.md)]
2929

30-
#### To validate data during a column's value change
30+
### To validate data during a column's value change
3131

32-
1. Open or create a new LINQ to SQL Classes file (**.dbml** file) in the [!INCLUDE[vs_ordesigner_short](../data-tools/includes/vs_ordesigner_short_md.md)]. (Double-click the **.dbml** file in **Solution Explorer**.)
32+
1. Open or create a new LINQ to SQL Classes file (**.dbml** file) in the **O/R Designer**. (Double-click the **.dbml** file in **Solution Explorer**.)
3333

34-
2. In the O/R Designer, right-click the class for which you want to add validation and then click **View Code**.
34+
2. In the **O/R Designer**, right-click the class for which you want to add validation and then click **View Code**.
3535

3636
The Code Editor opens with a partial class for the selected entity class.
3737

@@ -67,17 +67,17 @@ ms.workload:
6767
}
6868
```
6969

70-
## Adding Validation for Updates to an Entity Class
70+
## Add Validation for Updates to an Entity Class
7171
In addition to checking values during changes, you can also validate data when an attempt is made to update a complete entity class. Validation during an attempted update enables you to compare values in multiple columns if business rules require this. The following procedure shows how to validate when an attempt is made to update a complete entity class.
7272

7373
> [!NOTE]
7474
> Validation code for updates to complete entity classes is executed in the partial <xref:System.Data.Linq.DataContext> class (instead of in the partial class of a specific entity class).
7575

76-
#### To validate data during an update to an entity class
76+
### To validate data during an update to an entity class
7777

78-
1. Open or create a new LINQ to SQL Classes file (**.dbml** file) in the [!INCLUDE[vs_ordesigner_short](../data-tools/includes/vs_ordesigner_short_md.md)]. (Double-click the **.dbml** file in **Solution Explorer**.)
78+
1. Open or create a new LINQ to SQL Classes file (**.dbml** file) in the **O/R Designer**. (Double-click the **.dbml** file in **Solution Explorer**.)
7979

80-
2. Right-click an empty area on the O/R Designer and click **View Code**.
80+
2. Right-click an empty area on the **O/R Designer** and click **View Code**.
8181

8282
The Code Editor opens with a partial class for the `DataContext`.
8383

@@ -102,7 +102,7 @@ ms.workload:
102102

103103
For C# projects:
104104

105-
Because C# projects do not automatically generate event handlers, you can use IntelliSense to create the partial `UpdateCLASSNAME` method. Type `partial` and then a space to access the list of available partial methods. Click the update method for the class you want to add validation for. The following code resembles the code that is generated when you select an `UpdateCLASSNAME` partial method:
105+
Because C# projects do not automatically generate event handlers, you can use IntelliSense to create the partial `UpdateCLASSNAME` method. Type `partial` and then a space to access the list of available partial methods. Click the update method for the class on which you want to add validation. The following code resembles the code that is generated when you select an `UpdateCLASSNAME` partial method:
106106

107107
```csharp
108108
partial void UpdateCLASSNAME(CLASSNAME instance)
@@ -117,6 +117,6 @@ ms.workload:
117117

118118
## See also
119119

120-
- [LINQ to SQL Tools in Visual Studio](../data-tools/linq-to-sql-tools-in-visual-studio2.md)
121-
- [Validating Data](../data-tools/validate-data-in-datasets.md)
120+
- [LINQ to SQL tools in Visual Studio](../data-tools/linq-to-sql-tools-in-visual-studio2.md)
121+
- [Validating data](../data-tools/validate-data-in-datasets.md)
122122
- [LINQ to SQL (.NET Framework)](/dotnet/framework/data/adonet/sql/linq/index)

docs/data-tools/how-to-assign-stored-procedures-to-perform-updates-inserts-and-deletes-o-r-designer.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.workload:
1313
---
1414
# How to: Assign stored procedures to perform updates, inserts, and deletes (O/R Designer)
1515

16-
Stored procedures can be added to the O/R Designer and executed as typical <xref:System.Data.Linq.DataContext> methods. They can also be used to override the default LINQ to SQL runtime behavior that performs Inserts, Updates, and Deletes when changes are saved from entity classes to a database (for example, when calling the <xref:System.Data.Linq.DataContext.SubmitChanges%2A> method).
16+
Stored procedures can be added to the **O/R Designer** and executed as typical <xref:System.Data.Linq.DataContext> methods. They can also be used to override the default LINQ to SQL runtime behavior that performs Inserts, Updates, and Deletes when changes are saved from entity classes to a database (for example, when calling the <xref:System.Data.Linq.DataContext.SubmitChanges%2A> method).
1717

1818
> [!NOTE]
1919
> If your stored procedure returns values that need to be sent back to the client (for example, values calculated in the stored procedure), create output parameters in your stored procedures. If you cannot use output parameters, write a partial method implementation instead of relying on overrides generated by the O/R Designer. Members mapped to database-generated values need to be set to appropriate values after successful completion of INSERT or UPDATE operations. For more information, see [Responsibilities of the Developer In Overriding Default Behavior](/dotnet/framework/data/adonet/sql/linq/responsibilities-of-the-developer-in-overriding-default-behavior).
@@ -27,13 +27,13 @@ By default, the logic to update a database (inserts, updates, and deletes) with
2727

2828
[!INCLUDE[note_settings_general](../data-tools/includes/note_settings_general_md.md)]
2929

30-
#### To assign stored procedures to override the default behavior of an entity class
30+
### To assign stored procedures to override the default behavior of an entity class
3131

32-
1. Open the **LINQ to SQL** file in the designer. (Double-click the .dbml file in **Solution Explorer**.)
32+
1. Open the **LINQ to SQL** file in the designer. (Double-click the **.dbml** file in **Solution Explorer**.)
3333

3434
2. In **Server Explorer** or **Database Explorer**, expand **Stored Procedures** and locate the stored procedures that you want to use for the Insert, Update, and/or Delete commands of the entity class.
3535

36-
3. Drag the stored procedure onto the O/R Designer.
36+
3. Drag the stored procedure onto the **O/R Designer**.
3737

3838
The stored procedure is added to the methods pane as a <xref:System.Data.Linq.DataContext> method. For more information, see [DataContext Methods (O/R Designer)](../data-tools/datacontext-methods-o-r-designer.md).
3939

@@ -47,21 +47,21 @@ By default, the logic to update a database (inserts, updates, and deletes) with
4747

4848
8. Select the desired stored procedure in the **Customize** list.
4949

50-
9. Inspect the list of **Method Arguments** and **Class Properties** to verify that the **Method Arguments** map to the appropriate **Class Properties**. Map the original method arguments (Original_*ArgumentName*) to the original properties (*PropertyName* (Original)) for Update and Delete commands.
50+
9. Inspect the list of **Method Arguments** and **Class Properties** to verify that the **Method Arguments** map to the appropriate **Class Properties**. Map the original method arguments (`Original_<ArgumentName>`) to the original properties (`<PropertyName> (Original)`) for the `Update` and `Delete` commands.
5151

5252
> [!NOTE]
5353
> By default, method arguments map to class properties when the names match. If changed property names no longer match between the table and the entity class, you might have to select the equivalent class property to map to if the designer cannot determine the correct mapping.
5454
5555
10. Click **OK** or **Apply**.
5656

5757
> [!NOTE]
58-
> You can continue to configure the behavior for each class/behavior combination as long as you click **Apply** after you make each change. If you change the class or behavior before you click **Apply**, a warning dialog box providing an opportunity to apply any changes will appear.
58+
> You can continue to configure the behavior for each class and behavior combination as long as you click **Apply** after you make each change. If you change the class or behavior before you click **Apply**, a warning dialog box appears and provides you an opportunity to apply your changes.
5959
60-
To revert to using the default runtime logic for updates, click the ellipsis next to the Insert, Update, or Delete command in the **Properties** window and then select **Use runtime** in the **Configure Behavior** dialog box.
60+
To revert to using the default runtime logic for updates, click the ellipsis next to the **Insert**, **Update**, or **Delete** command in the **Properties** window and then select **Use runtime** in the **Configure Behavior** dialog box.
6161

6262
## See also
6363

6464
- [LINQ to SQL tools in Visual Studio](../data-tools/linq-to-sql-tools-in-visual-studio2.md)
6565
- [DataContext methods](../data-tools/datacontext-methods-o-r-designer.md)
6666
- [LINQ to SQL (.NET Framework)](/dotnet/framework/data/adonet/sql/linq/index)
67-
- [Insert, Update, and Delete operations (.NET Framework)](/dotnet/framework/data/adonet/sql/linq/insert-update-and-delete-operations)
67+
- [Insert, update, and delete operations (.NET Framework)](/dotnet/framework/data/adonet/sql/linq/insert-update-and-delete-operations)

0 commit comments

Comments
 (0)