Skip to content

Commit 72d6f4b

Browse files
committed
Clean up links (part 1)
Part of #2447
1 parent b76af2b commit 72d6f4b

File tree

11 files changed

+103
-96
lines changed

11 files changed

+103
-96
lines changed

entity-framework/core/get-started/wpf.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ Add a new `ProductContext.cs` class to the project with the following definition
7575
[!code-csharp[](../../../samples/core/WPF/GetStartedWPF/GetStartedWPF/ProductContext.cs)]
7676

7777
* The `DbSet` informs EF Core what C# entities should be mapped to the database.
78-
* There are a variety of ways to configure the EF Core `DbContext`. You can read about them in: [Configuring a DbContext](/ef/core/miscellaneous/configuring-dbcontext).
78+
* There are a variety of ways to configure the EF Core `DbContext`. You can read about them in: [Configuring a DbContext](xref:core/miscellaneous/configuring-dbcontext).
7979
* This example uses the `OnConfiguring` override to specify a Sqlite data file.
8080
* The `UseLazyLoadingProxies` call tells EF Core to implement lazy-loading, so child entities are automatically loaded when accessed from the parent.
8181

8282
Press **CTRL+SHIFT+B** or navigate to **Build > Build Solution** to compile the project.
8383

8484
> [!TIP]
85-
> Learn about the different was to keep your database and EF Core models in sync: [Managing Database Schemas](/ef/core/managing-schemas).
85+
> Learn about the different was to keep your database and EF Core models in sync: [Managing Database Schemas](xref:core/managing-schemas/index).
8686
8787
## Lazy Loading
8888

@@ -143,7 +143,7 @@ The code declares a long-running instance of `ProductContext`. The `ProductConte
143143
[!code-csharp[](../../../samples/core/WPF/GetStartedWPF/GetStartedWPF/MainWindow.xaml.cs)]
144144

145145
> [!NOTE]
146-
> The code uses a call to `EnsureCreated()` to build the database on the first run. This is acceptable for demos, but in production apps you should look at [migrations](/ef/core/managing-schemas/migrations/) to manage your schema. The code also executes synchronously because it uses a local SQLite database. For production scenarios that typically involve a remote server, consider using the asynchronous versions of the `Load` and `SaveChanges` methods.
146+
> The code uses a call to `EnsureCreated()` to build the database on the first run. This is acceptable for demos, but in production apps you should look at [migrations](xref:core/managing-schemas/migrations/index) to manage your schema. The code also executes synchronously because it uses a local SQLite database. For production scenarios that typically involve a remote server, consider using the asynchronous versions of the `Load` and `SaveChanges` methods.
147147
148148
## Test the WPF Application
149149

@@ -153,18 +153,18 @@ Compile and run the application by pressing **F5** or choosing **Debug > Star
153153

154154
## Property Change Notification
155155

156-
This example relies on four steps to synchronize the entities with the UI.
156+
This example relies on four steps to synchronize the entities with the UI.
157157

158158
1. The initial call `_context.Categories.Load()` loads the categories data.
159159
1. The lazy-loading proxies load the dependent products data.
160160
1. EF Core's built-in change tracking makes the necessary modifications to entities, including insertions and deletions, when `_context.SaveChanges()` is called.
161161
1. The calls to `DataGridView.Items.Refresh()` force a reload with the newly generated ids.
162162

163-
This works for our getting started sample, but you may require additional code for other scenarios. WPF controls render the UI by reading the fields and properties on your entities. When you edit a value in the user interface (UI), that value is passed to your entity. When you change the value of a property directly on your entity, such as loading it from the database, WPF will not immediately reflect the changes in the UI. The rendering engine must be notified of the changes. The project did this by manually calling `Refresh()`. An easy way to automate this notification is by implementing the [INotifyPropertyChanged](/dotnet/api/system.componentmodel.inotifypropertychanged) interface. WPF components will automatically detect the interface and register for change events. The entity is responsible for raising these events.
163+
This works for our getting started sample, but you may require additional code for other scenarios. WPF controls render the UI by reading the fields and properties on your entities. When you edit a value in the user interface (UI), that value is passed to your entity. When you change the value of a property directly on your entity, such as loading it from the database, WPF will not immediately reflect the changes in the UI. The rendering engine must be notified of the changes. The project did this by manually calling `Refresh()`. An easy way to automate this notification is by implementing the [INotifyPropertyChanged](/dotnet/api/system.componentmodel.inotifypropertychanged) interface. WPF components will automatically detect the interface and register for change events. The entity is responsible for raising these events.
164164

165165
> [!TIP]
166166
> To learn more about how to handle changes, read: [How to implement property change notification](/dotnet/framework/wpf/data/how-to-implement-property-change-notification).
167167
168168
## Next Steps
169169

170-
Learn more about [Configuring a DbContext](/ef/core/miscellaneous/configuring-dbcontext).
170+
Learn more about [Configuring a DbContext](xref:core/miscellaneous/configuring-dbcontext).

entity-framework/core/managing-schemas/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Managing Database Schemas - EF Core
33
author: bricelam
44
ms.date: 10/30/2017
5+
uid: core/managing-schemas/index
56
---
67
# Managing Database Schemas
78

@@ -19,7 +20,6 @@ scaffold a DbContext and the entity type classes by reverse engineering your dat
1920
> The [create and drop APIs][3] can also create the database schema from your EF Core model. However, they are primarily
2021
> for testing, prototyping, and other scenarios where dropping the database is acceptable.
2122
22-
2323
[1]: migrations/index.md
2424
[2]: scaffolding.md
2525
[3]: ensure-created.md

entity-framework/core/what-is-new/ef-core-5.0/whatsnew.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ See the [Configuring Navigation Properties documentation](xref:core/modeling/rel
967967

968968
Migrations and scaffolding now allow namespaces to be specified on the command line. For example, to reverse engineer a database putting the context and model classes in different namespaces:
969969

970-
```
970+
```dotnetcli
971971
dotnet ef dbcontext scaffold "connection string" Microsoft.EntityFrameworkCore.SqlServer --context-namespace "My.Context" --namespace "My.Model"
972972
```
973973

@@ -976,7 +976,7 @@ See the [Migrations](xref:core/managing-schemas/migrations/index#namespaces) and
976976
---
977977
Also, a connection string can now be passed to the `database-update` command:
978978

979-
```
979+
```dotnetcli
980980
dotnet ef database update --connection "connection string"
981981
```
982982

@@ -991,6 +991,7 @@ For performance reasons, EF doesn't do additional null-checks when reading value
991991
Using `EnableDetailedErrors` will add extra null checking to queries such that, for a small performance overhead, these errors are easier to trace back to a root cause.
992992

993993
For example:
994+
994995
```CSharp
995996
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
996997
=> optionsBuilder
@@ -1016,6 +1017,7 @@ Documentation is tracked by issue [#2199](https://github.com/dotnet/EntityFramew
10161017
### Support for the SQL Server DATALENGTH function
10171018

10181019
This can be accessed using the new `EF.Functions.DataLength` method. For example:
1020+
10191021
```CSharp
10201022
var count = context.Orders.Count(c => 100 < EF.Functions.DataLength(c.OrderDate));
10211023
```
@@ -1046,7 +1048,7 @@ Documentation is tracked by issue [#2230](https://github.com/dotnet/EntityFramew
10461048

10471049
### Complete discriminator mapping
10481050

1049-
EF Core uses a discriminator column for [TPH mapping of an inheritance hierarchy](/ef/core/modeling/inheritance). Some performance enhancements are possible so long as EF Core knows all possible values for the discriminator. EF Core 5.0 now implements these enhancements.
1051+
EF Core uses a discriminator column for [TPH mapping of an inheritance hierarchy](xref:core/modeling/inheritance). Some performance enhancements are possible so long as EF Core knows all possible values for the discriminator. EF Core 5.0 now implements these enhancements.
10501052

10511053
For example, previous versions of EF Core would always generate this SQL for a query returning all types in a hierarchy:
10521054

@@ -1174,7 +1176,7 @@ The Azure Cosmos DB database provider now supports optimistic concurrency using
11741176
builder.Entity<Customer>().Property(c => c.ETag).IsEtagConcurrency();
11751177
```
11761178

1177-
SaveChanges will then throw an `DbUpdateConcurrencyException` on a concurrency conflict, which [can be handled](/ef/core/saving/concurrency) to implement retries, etc.
1179+
SaveChanges will then throw an `DbUpdateConcurrencyException` on a concurrency conflict, which [can be handled](xref:core/saving/concurrency) to implement retries, etc.
11781180

11791181
Documentation is tracked by issue [#2099](https://github.com/dotnet/EntityFramework.Docs/issues/2099).
11801182

entity-framework/ef6/fundamentals/connection-resiliency/commit-failures.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ ms.date: "10/23/2016"
55
ms.assetid: 5b1f7a7d-1b24-4645-95ec-5608a31ef577
66
---
77
# Handling transaction commit failures
8+
89
> [!NOTE]
910
> **EF6.1 Onwards Only** - The features, APIs, etc. discussed in this page were introduced in Entity Framework 6.1. If you are using an earlier version, some or all of the information does not apply.
1011
11-
As part of 6.1 we are introducing a new connection resiliency feature for EF: the ability to detect and recover automatically when transient connection failures affect the acknowledgement of transaction commits. The full details of the scenario are best described in the blog post [SQL Database Connectivity and the Idempotency Issue](https://docs.microsoft.com/archive/blogs/adonet/sql-database-connectivity-and-the-idempotency-issue). In summary, the scenario is that when an exception is raised during a transaction commit there are two possible causes:
12+
As part of 6.1 we are introducing a new connection resiliency feature for EF: the ability to detect and recover automatically when transient connection failures affect the acknowledgement of transaction commits. The full details of the scenario are best described in the blog post [SQL Database Connectivity and the Idempotency Issue](/archive/blogs/adonet/sql-database-connectivity-and-the-idempotency-issue). In summary, the scenario is that when an exception is raised during a transaction commit there are two possible causes:
1213

1314
1. The transaction commit failed on the server
1415
2. The transaction commit succeeded on the server but a connectivity issue prevented the success notification from reaching the client
@@ -59,8 +60,8 @@ Before EF 6.1 there was not mechanism to handle commit failures in the EF produc
5960
1. Add a non-tracked table to the database used to track the status of the transactions.
6061
2. Insert a row into the table at the beginning of each transaction.
6162
3. If the connection fails during the commit, check for the presence of the corresponding row in the database.
62-
- If the row is present, continue normally, as the transaction was committed successfully
63-
- If the row is absent, use an execution strategy to retry the current operation.
63+
* If the row is present, continue normally, as the transaction was committed successfully
64+
* If the row is absent, use an execution strategy to retry the current operation.
6465
4. If the commit is successful, delete the corresponding row to avoid the growth of the table.
6566

66-
[This blog post](https://docs.microsoft.com/archive/blogs/adonet/sql-database-connectivity-and-the-idempotency-issue) contains sample code for accomplishing this on SQL Azure.
67+
[This blog post](/archive/blogs/adonet/sql-database-connectivity-and-the-idempotency-issue) contains sample code for accomplishing this on SQL Azure.

entity-framework/ef6/fundamentals/databinding/winforms.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Databinding with WinForms - EF6"
33
author: divega
44
ms.date: "10/23/2016"
55
ms.assetid: 80fc5062-2f1c-4dbd-ab6e-b99496784b36
6+
uid: ef6/fundamentals/databinding/winforms
67
---
78
# Databinding with WinForms
89
This step-by-step walkthrough shows how to bind POCO types to Window Forms (WinForms) controls in a “master-detail" form. The application uses Entity Framework to populate objects with data from the database, track changes, and persist data to the database.

0 commit comments

Comments
 (0)