Skip to content

Commit

Permalink
Scrub for versions older than 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bricelam committed Oct 7, 2020
1 parent ed5b046 commit c1e9532
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 50 deletions.
12 changes: 1 addition & 11 deletions entity-framework/core/get-started/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,6 @@ For ASP.NET Core apps, this package is included automatically.

* EF Core, together with the SQL Server and the in-memory providers are included in current versions of ASP.NET Core. To upgrade an existing ASP.NET Core application to a newer version of EF Core, always upgrade the version of ASP.NET Core.

* If you need to update an application that is using a third-party database provider, always check for an update of the provider that is compatible with the version of EF Core you want to use. For example, database providers for previous versions are not compatible with version 2.0 of the EF Core runtime.
* If you need to update an application that is using a third-party database provider, always check for an update of the provider that is compatible with the version of EF Core you want to use. For example, database providers for version 1.0 are not compatible with version 2.0 of the EF Core runtime.

* Third-party providers for EF Core usually don't release patch versions alongside the EF Core runtime. To upgrade an application that uses a third-party provider to a patch version of EF Core, you may need to add a direct reference to individual EF Core runtime components, such as Microsoft.EntityFrameworkCore, and Microsoft.EntityFrameworkCore.Relational.

* If you're upgrading an existing application to the latest version of EF Core, some references to older EF Core packages may need to be removed manually:

* Database provider design-time packages such as `Microsoft.EntityFrameworkCore.SqlServer.Design` are no longer required or supported from EF Core 2.0 and later, but aren't automatically removed when upgrading the other packages.

* The .NET CLI tools are included in the .NET SDK since version 2.1, so the reference to that package can be removed from the project file:

``` xml
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
```
6 changes: 3 additions & 3 deletions entity-framework/core/miscellaneous/cli/powershell.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ If you aren't using Visual Studio, we recommend the [EF Core Command-line Tools]

## Installing the tools

The procedures for installing and updating the tools differ between ASP.NET Core 2.1+ and earlier versions or other project types.
The procedures for installing and updating the tools differ between ASP.NET Core and other project types.

### ASP.NET Core version 2.1 and later
### ASP.NET Core projects

The tools are automatically included in an ASP.NET Core 2.1+ project because the `Microsoft.EntityFrameworkCore.Tools` package is included in the [Microsoft.AspNetCore.App metapackage](/aspnet/core/fundamentals/metapackage-app).

Expand Down Expand Up @@ -46,7 +46,7 @@ To update the tools:
* Update Visual Studio to the latest version.
* Edit the *.csproj* file so that it includes a package reference to the latest tools package, as shown earlier.

### Other versions and project types
### Other project types

Install the Package Manager Console tools by running the following command in **Package Manager Console**:

Expand Down
9 changes: 3 additions & 6 deletions entity-framework/core/modeling/constructors.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ uid: core/modeling/constructors
---
# Entity types with constructors

> [!NOTE]
> This feature is new in EF Core 2.1.
Starting with EF Core 2.1, it is now possible to define a constructor with parameters and have EF Core call this constructor when creating an instance of the entity. The constructor parameters can be bound to mapped properties, or to various kinds of services to facilitate behaviors like lazy-loading.
It's possible to define a constructor with parameters and have EF Core call this constructor when creating an instance of the entity. The constructor parameters can be bound to mapped properties, or to various kinds of services to facilitate behaviors like lazy-loading.

> [!NOTE]
> As of EF Core 2.1, all constructor binding is by convention. Configuration of specific constructors to use is planned for a future release.
> Currently, all constructor binding is by convention. Configuration of specific constructors to use is planned for a future release.
## Binding to mapped properties

Expand Down Expand Up @@ -215,7 +212,7 @@ EF Core can also inject "services" into an entity type's constructor. For exampl
* `IEntityType` - the EF Core metadata associated with this entity type

> [!NOTE]
> As of EF Core 2.1, only services known by EF Core can be injected. Support for injecting application services is being considered for a future release.
> Currently, only services known by EF Core can be injected. Support for injecting application services is being considered for a future release.
For example, an injected DbContext can be used to selectively access the database to obtain information about related entities without loading them all. In the example below this is used to obtain the number of posts in a blog without loading the posts:

Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/modeling/keyless-entity-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ uid: core/modeling/keyless-entity-types
# Keyless Entity Types

> [!NOTE]
> This feature was added in EF Core 2.1 under the name of query types. In EF Core 3.0 the concept was renamed to keyless entity types. The `[Keyless]` Data Annotation became available in EFCore 5.0.
> This feature was added under the name of query types. In EF Core 3.0 the concept was renamed to keyless entity types. The `[Keyless]` Data Annotation became available in EFCore 5.0.
In addition to regular entity types, an EF Core model can contain _keyless entity types_, which can be used to carry out database queries against data that doesn't contain key values.

Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/modeling/owned-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Owned entities are essentially a part of the owner and cannot exist without it,

## Explicit configuration

Owned entity types are never included by EF Core in the model by convention. You can use the `OwnsOne` method in `OnModelCreating` or annotate the type with `OwnedAttribute` (new in EF Core 2.1) to configure the type as an owned type.
Owned entity types are never included by EF Core in the model by convention. You can use the `OwnsOne` method in `OnModelCreating` or annotate the type with `OwnedAttribute` to configure the type as an owned type.

In this example, `StreetAddress` is a type with no identity property. It is used as a property of the Order type to specify the shipping address for a particular order.

Expand Down
3 changes: 0 additions & 3 deletions entity-framework/core/modeling/value-conversions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ uid: core/modeling/value-conversions
---
# Value Conversions

> [!NOTE]
> This feature is new in EF Core 2.1.
Value converters allow property values to be converted when reading from or writing to the database. This conversion can be from one value to another of the same type (for example, encrypting strings) or from a value of one type to a value of another type (for example, converting enum values to and from strings in the database.)

## Fundamentals
Expand Down
1 change: 0 additions & 1 deletion entity-framework/core/providers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Entity Framework Core can access many different databases through plug-in librar
| [Teradata.EntityFrameworkCore](https://www.nuget.org/packages/Teradata.EntityFrameworkCore/) | Teradata Database 16.10 onwards | [Teradata](https://downloads.teradata.com/download/connectivity/net-data-provider-for-teradata) | | 2.2 |[website](https://www.nuget.org/packages/Teradata.EntityFrameworkCore/) |
| [EntityFrameworkCore.FirebirdSql](https://www.nuget.org/packages/EntityFrameworkCore.FirebirdSql/) | Firebird 2.5 and 3.x | [Rafael Almeida](https://github.com/ralmsdeveloper) | | 2.1 | [wiki](https://github.com/ralmsdeveloper/EntityFrameworkCore.FirebirdSQL/wiki) |
| [EntityFrameworkCore.OpenEdge](https://www.nuget.org/packages/EntityFrameworkCore.OpenEdge/) | Progress OpenEdge | [Alex Wiese](https://github.com/alexwiese) | | 2.1 | [readme](https://github.com/alexwiese/EntityFrameworkCore.OpenEdge/blob/master/README.md) |
| [Pomelo.EntityFrameworkCore.MyCat](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MyCat) | MyCAT Server | [Pomelo Foundation Project](https://github.com/PomeloFoundation) | Prerelease only | 1.1 | [readme](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MyCat/blob/master/README.md) |

## Adding a database provider to your application

Expand Down
26 changes: 13 additions & 13 deletions entity-framework/core/providers/sqlite/limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,28 @@ A rebuild will be attempted in order to perform certain operations. Rebuilds are
| Operation | Supported? | Requires version |
|:---------------------|:------------|:-----------------|
| AddCheckConstraint | ✔ (rebuild) | 5.0 |
| AddColumn || 1.0 |
| AddColumn || |
| AddForeignKey | ✔ (rebuild) | 5.0 |
| AddPrimaryKey | ✔ (rebuild) | 5.0 |
| AddUniqueConstraint | ✔ (rebuild) | 5.0 |
| AlterColumn | ✔ (rebuild) | 5.0 |
| CreateIndex || 1.0 |
| CreateTable || 1.0 |
| CreateIndex || |
| CreateTable || |
| DropCheckConstraint | ✔ (rebuild) | 5.0 |
| DropColumn | ✔ (rebuild) | 5.0 |
| DropForeignKey | ✔ (rebuild) | 5.0 |
| DropIndex || 1.0 |
| DropIndex || |
| DropPrimaryKey | ✔ (rebuild) | 5.0 |
| DropTable || 1.0 |
| DropTable || |
| DropUniqueConstraint | ✔ (rebuild) | 5.0 |
| RenameColumn || 2.2.2 |
| RenameIndex | ✔ (rebuild) | 2.1 |
| RenameTable || 1.0 |
| EnsureSchema | ✔ (no-op) | 2.0 |
| DropSchema | ✔ (no-op) | 2.0 |
| Insert || 2.0 |
| Update || 2.0 |
| Delete || 2.0 |
| RenameColumn || 2.2 |
| RenameIndex | ✔ (rebuild) | |
| RenameTable || |
| EnsureSchema | ✔ (no-op) | |
| DropSchema | ✔ (no-op) | |
| Insert || |
| Update || |
| Delete || |

### Migrations limitations workaround

Expand Down
3 changes: 0 additions & 3 deletions entity-framework/core/saving/cascade-delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ At a high level:
> [!NOTE]
> In EF Core, unlike EF6, cascading effects do not happen immediately, but instead only when SaveChanges is called.
> [!NOTE]
> **Changes in EF Core 2.0:** In previous releases, *Restrict* would cause optional foreign key properties in tracked dependent entities to be set to null, and was the default delete behavior for optional relationships. In EF Core 2.0, the *ClientSetNull* was introduced to represent that behavior and became the default for optional relationships. The behavior of *Restrict* was adjusted to never have any side effects on dependent entities.
## Entity deletion examples

The code below is part of a [sample](https://github.com/dotnet/EntityFramework.Docs/tree/master/samples/core/Saving/CascadeDelete/) that can be downloaded and run. The sample shows what happens for each delete behavior for both optional and required relationships when a parent entity is deleted.
Expand Down
3 changes: 0 additions & 3 deletions entity-framework/core/saving/disconnected-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ However, if the entity uses auto-generated key values, then the Update method ca

The Update method normally marks the entity for update, not insert. However, if the entity has a auto-generated key, and no key value has been set, then the entity is instead automatically marked for insert.

> [!TIP]
> This behavior was introduced in EF Core 2.0. For earlier releases it is always necessary to explicitly choose either Add or Update.
If the entity is not using auto-generated keys, then the application must decide whether the entity should be inserted or updated: For example:

[!code-csharp[Main](../../../samples/core/Saving/Disconnected/Sample.cs#InsertOrUpdateSingleEntityWithFind)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ The `Employee.LastPayRaise` property is configured to have values generated by t
> [!NOTE]
> By default, EF Core will throw an exception if you try to save an explicit value for a property that is configured to be generated during update. To avoid this, you need to drop down to the lower level metadata API and set the `AfterSaveBehavior` (as shown above).
> [!NOTE]
> **Changes in EF Core 2.0:** In previous releases the after-save behavior was controlled through the `IsReadOnlyAfterSave` flag. This flag has been obsoleted and replaced by `AfterSaveBehavior`.
There is also a trigger in the database to generate values for the `LastPayRaise` column during `UPDATE` operations.

[!code-sql[Main](../../../samples/core/Saving/ExplicitValuesGenerateProperties/employee_UPDATE.sql)]
Expand Down
4 changes: 2 additions & 2 deletions entity-framework/core/saving/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ It is also possible to enlist in an explicit transaction.

### Limitations of System.Transactions

1. EF Core relies on database providers to implement support for System.Transactions. Although support is quite common among ADO.NET providers for .NET Framework, the API has only been recently added to .NET Core and hence support is not as widespread. If a provider does not implement support for System.Transactions, it is possible that calls to these APIs will be completely ignored. SqlClient for .NET Core does support it from 2.1 onwards. SqlClient for .NET Core 2.0 throws an exception if you attempt to use the feature.
1. EF Core relies on database providers to implement support for System.Transactions. If a provider does not implement support for System.Transactions, it is possible that calls to these APIs will be completely ignored. SqlClient supports it.

> [!IMPORTANT]
> It is recommended that you test that the API behaves correctly with your provider before you rely on it for managing transactions. You are encouraged to contact the maintainer of the database provider if it does not.
2. As of version 2.1, the System.Transactions implementation in .NET Core does not include support for distributed transactions, therefore you cannot use `TransactionScope` or `CommittableTransaction` to coordinate transactions across multiple resource managers.
2. As of .NET Core 2.1, the System.Transactions implementation does not include support for distributed transactions, therefore you cannot use `TransactionScope` or `CommittableTransaction` to coordinate transactions across multiple resource managers.

0 comments on commit c1e9532

Please sign in to comment.