Skip to content

Commit

Permalink
Minor changes in dbcontext-creation.md (#3118)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWestminster authored Mar 12, 2021
1 parent 4798ab8 commit 2b4bf41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion entity-framework/core/cli/dbcontext-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If the DbContext can't be obtained from the application service provider, the to

## From a design-time factory

You can also tell the tools how to create your DbContext by implementing the `IDesignTimeDbContextFactory<TContext>` interface: If a class implementing this interface is found in either the same project as the derived `DbContext` or in the application's startup project, the tools bypass the other ways of creating the DbContext and use the design-time factory instead.
You can also tell the tools how to create your DbContext by implementing the <xref:Microsoft.EntityFrameworkCore.Design.IDesignTimeDbContextFactory%601?displayProperty=nameWithType> interface: If a class implementing this interface is found in either the same project as the derived `DbContext` or in the application's startup project, the tools bypass the other ways of creating the DbContext and use the design-time factory instead.

[!code-csharp[Main](../../../samples/core/Miscellaneous/CommandLine/BloggingContextFactory.cs#BloggingContextFactory)]

Expand Down
8 changes: 4 additions & 4 deletions entity-framework/core/what-is-new/nuget-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Entity Framework Core (EF Core) is shipped as [NuGet](https://www.nuget.org/) pa
The usual process for installing packages is:

- Decide on a database provider and install the appropriate package ([see below](#database-providers))
- Also install [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/), and [Microsoft.EntityFrameworkCore.Relational](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Relational/) if using a relational provider. This helps ensure that consistent versions are being used, and also means that NuGet will let you know know when new package versions are shipped.
- Optionally, decide which kind of tooling you need and install the appropriate packages for that (see below)
- Also install [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/), and [Microsoft.EntityFrameworkCore.Relational](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Relational/) if using a relational database provider. This helps ensure that consistent versions are being used, and also means that NuGet will let you know when new package versions are shipped.
- Optionally, decide which kind of tooling you need and install the appropriate packages for that ([see below](#tools))

See [Getting started tutorial for Entity Framework Core](xref:core/get-started/overview/first-app) for help getting started with EF Core.

Expand All @@ -28,7 +28,7 @@ Make sure to install the same version of all EF Core packages shipped by Microso
Also make sure that any external packages are compatible with the version of EF Core being used. In particular, check that external database provider supports the version of EF Core you are using. New major versions of EF Core usually require an updated database provider.

> [!WARNING]
> NuGet does not enforce consistent package versions. Always carefully check which versions you are referencing in your `csproj` file or equivalent.
> NuGet does not enforce consistent package versions. Always carefully check which package versions you are referencing in your `.csproj` file or equivalent.
## Database providers

Expand Down Expand Up @@ -59,7 +59,7 @@ Use of tooling for [EF Core migrations](xref:core/managing-schemas/migrations/in
See [Entity Framework Core Tools Reference](xref:core/cli/index) for more information on using EF Core tooling, including how to correctly install the `dotnet-ef` tool in a project or globally.

> [!TIP]
> By default, the Microsoft.EntityFrameworkCore.Design package is installed in such a way that it will not be deployed with your application. This also means that its types cannot be transitively used in other projects. Use a normal `PackageReference` in your `.csproj` file or equivalent if you need access to the types in package. See [Design-time services](xref:core/cli/services) for more information.
> By default, the Microsoft.EntityFrameworkCore.Design package is installed in such a way that it will not be deployed with your application. This also means that its types cannot be transitively used in other projects. Use a normal `PackageReference` in your `.csproj` file or equivalent if you need access to the types in this package. See [Design-time services](xref:core/cli/services) for more information.
## Extension packages

Expand Down

0 comments on commit 2b4bf41

Please sign in to comment.