-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Entity Framework v8.0 (#126)
* Added test project for Entity Framework Core v8.0.0 * Relaxed package constraints * Added version support description * Fixed warnings * Updated pipelines
- Loading branch information
Showing
29 changed files
with
434 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"sdk": { | ||
"version": "6.0.100", | ||
"version": "8.0.100", | ||
"rollForward": "latestFeature" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
139 changes: 69 additions & 70 deletions
139
...s/EntityFrameworkCore.AutoFixture.EF2.Tests/Migrations/20220803095509_InitialMigration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,83 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
namespace EntityFrameworkCore.AutoFixture.Tests.Migrations | ||
namespace EntityFrameworkCore.AutoFixture.Tests.Migrations; | ||
|
||
public partial class InitialMigration : Migration | ||
{ | ||
public partial class InitialMigration : Migration | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Customers", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(nullable: false), | ||
Name = table.Column<string>(nullable: true) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Customers", x => x.Id); | ||
}); | ||
migrationBuilder.CreateTable( | ||
name: "Customers", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(nullable: false), | ||
Name = table.Column<string>(nullable: true) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Customers", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "Items", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(nullable: false), | ||
Name = table.Column<string>(nullable: true), | ||
Price = table.Column<decimal>(nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Items", x => x.Id); | ||
}); | ||
migrationBuilder.CreateTable( | ||
name: "Items", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(nullable: false), | ||
Name = table.Column<string>(nullable: true), | ||
Price = table.Column<decimal>(nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Items", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateTable( | ||
name: "Orders", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(nullable: false), | ||
Count = table.Column<int>(nullable: false), | ||
CustomerId = table.Column<Guid>(nullable: false), | ||
ItemId = table.Column<Guid>(nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Orders", x => x.Id); | ||
table.ForeignKey( | ||
name: "FK_Orders_Customers_CustomerId", | ||
column: x => x.CustomerId, | ||
principalTable: "Customers", | ||
principalColumn: "Id", | ||
onDelete: ReferentialAction.Cascade); | ||
table.ForeignKey( | ||
name: "FK_Orders_Items_ItemId", | ||
column: x => x.ItemId, | ||
principalTable: "Items", | ||
principalColumn: "Id", | ||
onDelete: ReferentialAction.Cascade); | ||
}); | ||
migrationBuilder.CreateTable( | ||
name: "Orders", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(nullable: false), | ||
Count = table.Column<int>(nullable: false), | ||
CustomerId = table.Column<Guid>(nullable: false), | ||
ItemId = table.Column<Guid>(nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Orders", x => x.Id); | ||
table.ForeignKey( | ||
name: "FK_Orders_Customers_CustomerId", | ||
column: x => x.CustomerId, | ||
principalTable: "Customers", | ||
principalColumn: "Id", | ||
onDelete: ReferentialAction.Cascade); | ||
table.ForeignKey( | ||
name: "FK_Orders_Items_ItemId", | ||
column: x => x.ItemId, | ||
principalTable: "Items", | ||
principalColumn: "Id", | ||
onDelete: ReferentialAction.Cascade); | ||
}); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Orders_CustomerId", | ||
table: "Orders", | ||
column: "CustomerId"); | ||
migrationBuilder.CreateIndex( | ||
name: "IX_Orders_CustomerId", | ||
table: "Orders", | ||
column: "CustomerId"); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Orders_ItemId", | ||
table: "Orders", | ||
column: "ItemId"); | ||
} | ||
migrationBuilder.CreateIndex( | ||
name: "IX_Orders_ItemId", | ||
table: "Orders", | ||
column: "ItemId"); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Orders"); | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Orders"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "Customers"); | ||
migrationBuilder.DropTable( | ||
name: "Customers"); | ||
|
||
migrationBuilder.DropTable( | ||
name: "Items"); | ||
} | ||
migrationBuilder.DropTable( | ||
name: "Items"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.