Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master -> main references #3140

Merged
merged 1 commit into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Build Samples

on:
push:
branches: [master]
branches: [main]
paths:
- "samples/core/**"
- ".github/workflows/build-samples.yml"
pull_request:
branches: [master]
branches: [main]
paths:
- "samples/core/**"
- ".github/workflows/build-samples.yml"
Expand Down
4 changes: 2 additions & 2 deletions .openpublishing.publish.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
"sync_notification_subscribers": [],
"branches_to_filter": [],
"git_repository_branch_open_to_public_contributors": "master",
"git_repository_branch_open_to_public_contributors": "main",
"skip_source_output_uploading": false,
"need_preview_pull_request": true,
"need_pr_comments": false,
Expand All @@ -50,7 +50,7 @@
"Publish",
"Pdf"
],
"master": [
"main": [
"Publish",
"Pdf"
]
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ You'll need a basic understanding of [Git and GitHub.com](https://guides.github.

* Open an [issue](https://github.com/dotnet/EntityFramework.Docs/issues/new) describing what you want to do, such as change an existing article or create a new one. Wait for approval from the EF team before you invest much time.
* Fork the [dotnet/EntityFramework.Docs](https://github.com/dotnet/EntityFramework.Docs/) repo and create a branch for your changes.
* Submit a pull request (PR) to master with your changes.
* Submit a pull request (PR) to main with your changes.
* Respond to PR feedback.

## Markdown syntax

Articles are written in [DocFx-flavored Markdown (DFM)](http://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html), a superset of [GitHub-flavored Markdown (GFM)](https://guides.github.com/features/mastering-markdown/). For examples of DFM syntax and metadata for UI features commonly used in the EF documentation, see [Metadata and Markdown Template](https://github.com/dotnet/docs/blob/master/styleguide/template.md) in the .NET Core repo style guide.
Articles are written in [DocFx-flavored Markdown (DFM)](http://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html), a superset of [GitHub-flavored Markdown (GFM)](https://guides.github.com/features/mastering-markdown/). For examples of DFM syntax and metadata for UI features commonly used in the EF documentation, see [Metadata and Markdown Template](https://docs.microsoft.com/contribute/dotnet/dotnet-style-guide).

## Folder structure conventions

Expand Down Expand Up @@ -96,4 +96,4 @@ DocFX requires the .NET Framework on Windows, or Mono for Linux or macOS.

## Voice and tone

Our goal is to write documentation that is easily understandable by the widest possible audience. To that end we have established guidelines for writing style that we ask our contributors to follow. For more information, see [Voice and tone guidelines](https://github.com/dotnet/docs/blob/master/styleguide/voice-tone.md) in the .NET Core repo.
Our goal is to write documentation that is easily understandable by the widest possible audience. To that end we have established guidelines for writing style that we ask our contributors to follow. For more information, see [Voice and tone guidelines](https://docs.microsoft.com/contribute/dotnet/dotnet-voice-tone).
2 changes: 1 addition & 1 deletion entity-framework/core/change-tracking/change-detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Each <xref:Microsoft.EntityFrameworkCore.DbContext> instance tracks changes made
Tracking property and relationship changes requires that the DbContext is able to detect these changes. This document covers how this detection happens, as well as how to use property notifications or change-tracking proxies to force immediate detection of changes.

> [!TIP]
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/ChangeTracking/ChangeDetectionAndNotifications).
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/ChangeTracking/ChangeDetectionAndNotifications).

## Snapshot change tracking

Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/change-tracking/debug-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The Entity Framework Core (EF Core) change tracker generates two kinds of output
> This document assumes that entity states and the basics of EF Core change tracking are understood. See [Change Tracking in EF Core](xref:core/change-tracking/index) for more information on these topics.

> [!TIP]
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/ChangeTracking/ChangeTrackerDebugging).
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/ChangeTracking/ChangeTrackerDebugging).

## Change tracker debug view

Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/change-tracking/entity-entries.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Each of these is described in more detail in the sections below.
> This document assumes that entity states and the basics of EF Core change tracking are understood. See [Change Tracking in EF Core](xref:core/change-tracking/index) for more information on these topics.

> [!TIP]
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/ChangeTracking/AccessingTrackedEntities).
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/ChangeTracking/AccessingTrackedEntities).

## Using DbContext.Entry and EntityEntry instances

Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/change-tracking/explicit-tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Entity Framework Core (EF Core) change tracking works best when the same <xref:M
> This document assumes that entity states and the basics of EF Core change tracking are understood. See [Change Tracking in EF Core](xref:core/change-tracking/index) for more information on these topics.

> [!TIP]
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/ChangeTracking/ChangeTrackingInEFCore).
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/ChangeTracking/ChangeTrackingInEFCore).

> [!TIP]
> For simplicity, this document uses and references synchronous methods such as <xref:Microsoft.EntityFrameworkCore.DbContext.SaveChanges%2A> rather than their async equivalents such as <xref:Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync%2A>. Calling and awaiting the async method can be substituted unless otherwise noted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A <xref:Microsoft.EntityFrameworkCore.DbContext> can only track one entity insta
> This document assumes that entity states and the basics of EF Core change tracking are understood. See [Change Tracking in EF Core](xref:core/change-tracking/index) for more information on these topics.

> [!TIP]
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/ChangeTracking/IdentityResolutionInEFCore).
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/ChangeTracking/IdentityResolutionInEFCore).

## Introduction

Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/change-tracking/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Each <xref:Microsoft.EntityFrameworkCore.DbContext> instance tracks changes made
This document presents an overview of Entity Framework Core (EF Core) change tracking and how it relates to queries and updates.

> [!TIP]
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/ChangeTracking/ChangeTrackingInEFCore).
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/ChangeTracking/ChangeTrackingInEFCore).

> [!TIP]
> For simplicity, this document uses and references synchronous methods such as <xref:Microsoft.EntityFrameworkCore.DbContext.SaveChanges%2A> rather than their async equivalents such as <xref:Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync%2A>. Calling and awaiting the async method can be substituted unless otherwise noted.
Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/change-tracking/miscellaneous.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This document covers miscellaneous features and scenarios involving change track
> This document assumes that entity states and the basics of EF Core change tracking are understood. See [Change Tracking in EF Core](xref:core/change-tracking/index) for more information on these topics.

> [!TIP]
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/ChangeTracking/AdditionalChangeTrackingFeatures).
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/ChangeTracking/AdditionalChangeTrackingFeatures).

## `Add` versus `AddAsync`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Navigations can be used on both sides of the relationship, on one side only, or
> This document assumes that entity states and the basics of EF Core change tracking are understood. See [Change Tracking in EF Core](xref:core/change-tracking/index) for more information on these topics.

> [!TIP]
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/ChangeTracking/ChangingFKsAndNavigations).
> You can run and debug into all the code in this document by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/ChangeTracking/ChangingFKsAndNavigations).

### Example model

Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/get-started/overview/first-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In this tutorial, you create a .NET Core console app that performs data access a

You can follow the tutorial by using Visual Studio on Windows, or by using the .NET Core CLI on Windows, macOS, or Linux.

[View this article's sample on GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/GetStarted).
[View this article's sample on GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/GetStarted).

## Prerequisites

Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/get-started/wpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The model defines two types that participate in one-to-many relationship: **Cate
The screen shots and code listings in this walkthrough are taken from Visual Studio 2019 16.6.5.

> [!TIP]
> You can view this article's [sample on GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/WPF).
> You can view this article's [sample on GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/WPF).

## Pre-Requisites

Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/get-started/xamarin.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In this tutorial, you create a [Xamarin.Forms](/xamarin/get-started/what-is-xama
You can follow the tutorial by using Visual Studio on Windows or Visual Studio for Mac.

> [!TIP]
> You can view this article's [sample on GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Xamarin).
> You can view this article's [sample on GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Xamarin).

## Prerequisites

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ uid: core/logging-events-diagnostics/diagnostic-listeners
# Using Diagnostic Listeners in EF Core

> [!TIP]
> You can [download this article's sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/DiagnosticListeners) from GitHub.
> You can [download this article's sample](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/DiagnosticListeners) from GitHub.

Diagnostic listeners allow listening for any EF Core event that occurs in the current .NET process. The <xref:System.Diagnostics.DiagnosticListener> class is a part of a [common mechanism across .NET](https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/DiagnosticSourceUsersGuide.md) for obtaining diagnostic information from running applications.

Expand Down Expand Up @@ -92,7 +92,7 @@ For example, the code above handles the <xref:Microsoft.EntityFrameworkCore.Diag
> [!TIP]
> ToString is overridden in every EF Core event data class to generate the equivalent log message for the event. For example, calling `ContextInitializedEventData.ToString` generates "Entity Framework Core 5.0.0 initialized 'BlogsContext' using provider 'Microsoft.EntityFrameworkCore.Sqlite' with options: None".

The [sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/DiagnosticListeners) contains a simple console application that makes changes to the blogging database and prints out the diagnostic events encountered.
The [sample](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/DiagnosticListeners) contains a simple console application that makes changes to the blogging database and prints out the diagnostic events encountered.

<!--
public static void Main()
Expand Down
4 changes: 2 additions & 2 deletions entity-framework/core/logging-events-diagnostics/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ uid: core/logging-events-diagnostics/events
# .NET Events in EF Core

> [!TIP]
> You can [download the events sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/Events) from GitHub.
> You can [download the events sample](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/Events) from GitHub.

Entity Framework Core (EF Core) exposes [.NET events](/dotnet/standard/events/) to act as callbacks when certain things happen in the EF Core code. Events are simpler than [interceptors](xref:core/logging-events-diagnostics/interceptors) and allow more flexible registration. However, they are sync only and so cannot perform non-blocking async I/O.

Expand Down Expand Up @@ -85,7 +85,7 @@ This method has the appropriate signature to use as an event handler for both th

Both events are needed because new entities fire `Tracked` events when they are first tracked. `StateChanged` events are only fired for entities that change state while they are _already_ being tracked.

The [sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/Events) for this example contains a simple console application that makes changes to the blogging database:
The [sample](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/Events) for this example contains a simple console application that makes changes to the blogging database:

<!--
using (var context = new BlogsContext())
Expand Down
14 changes: 7 additions & 7 deletions entity-framework/core/logging-events-diagnostics/interceptors.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Each pair of methods have both sync and async variations. This allows for asynch
### Example: Command interception to add query hints

> [!TIP]
> You can [download the command interceptor sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/CommandInterception) from GitHub.
> You can [download the command interceptor sample](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/CommandInterception) from GitHub.

An <xref:Microsoft.EntityFrameworkCore.Diagnostics.IDbCommandInterceptor> can be used to modify SQL before it is sent to the database. This example shows how to modify the SQL to include a query hint.

Expand Down Expand Up @@ -144,7 +144,7 @@ FROM [Blogs] AS [b]
### Example: Connection interception for SQL Azure authentication using ADD

> [!TIP]
> You can [download the connection interceptor sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/ConnectionInterception) from GitHub.
> You can [download the connection interceptor sample](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/ConnectionInterception) from GitHub.

An <xref:Microsoft.EntityFrameworkCore.Diagnostics.IDbConnectionInterceptor> can be used to manipulate the <xref:System.Data.Common.DbConnection> before it is used to connect to the database. This can be used to obtain an Azure Active Directory (AAD) access token. For example:

Expand Down Expand Up @@ -188,7 +188,7 @@ public class AadAuthenticationInterceptor : DbConnectionInterceptor
### Example: Advanced command interception for caching

> [!TIP]
> You can [download the advanced command interceptor sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/CachingInterception) from GitHub.
> You can [download the advanced command interceptor sample](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/CachingInterception) from GitHub.

EF Core interceptors can:

Expand Down Expand Up @@ -294,7 +294,7 @@ If no cached message is available, or if it has expired, then the code above doe

#### Demonstration

The [caching interceptor sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/CachingInterception) contains a simple console application that queries for daily messages to test the caching:
The [caching interceptor sample](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/CachingInterception) contains a simple console application that queries for daily messages to test the caching:

<!--
// 1. Initialize the database with some daily messages.
Expand Down Expand Up @@ -394,7 +394,7 @@ Notice from the log output that the application continues to use the cached mess
> SaveChanges interception was introduced in EF Core 5.0.

> [!TIP]
> You can [download the SaveChanges interceptor sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/SaveChangesInterception) from GitHub.
> You can [download the SaveChanges interceptor sample](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/SaveChangesInterception) from GitHub.

<xref:Microsoft.EntityFrameworkCore.DbContext.SaveChanges%2A> and <xref:Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync%2A> interception points are defined by the <xref:Microsoft.EntityFrameworkCore.Diagnostics.ISaveChangesInterceptor> interface. As for other interceptors, the <xref:Microsoft.EntityFrameworkCore.Diagnostics.SaveChangesInterceptor> base class with no-op methods is provided as a convenience.

Expand All @@ -410,7 +410,7 @@ SaveChanges can be intercepted to create an independent audit record of the chan

#### The application context

The [sample for auditing](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/SaveChangesInterception) uses a simple DbContext with blogs and posts.
The [sample for auditing](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/SaveChangesInterception) uses a simple DbContext with blogs and posts.

<!--
public class BlogsContext : DbContext
Expand Down Expand Up @@ -668,7 +668,7 @@ Failure is handled in much the same way as success, but in the <xref:Microsoft.E

#### Demonstration

The [auditing sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/SaveChangesInterception) contains a simple console application that makes changes to the blogging database and then shows the auditing that was created.
The [auditing sample](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/SaveChangesInterception) contains a simple console application that makes changes to the blogging database and then shows the auditing that was created.

<!--
// Insert, update, and delete some entities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ uid: core/logging-events-diagnostics/simple-logging
> This feature was introduced in EF Core 5.0.

> [!TIP]
> You can [download this article's sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Miscellaneous/Logging/SimpleLogging) from GitHub.
> You can [download this article's sample](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/Logging/SimpleLogging) from GitHub.

Entity Framework Core (EF Core) simple logging can be used to easily obtain logs while developing and debugging applications. This form of logging requires minimal configuration and no additional NuGet packages.

Expand Down
Loading