Skip to content

Commit 624d0c2

Browse files
committed
fix(example): pluralize todo Items collection
1 parent cedea74 commit 624d0c2

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/JsonApiDotNetCoreExample/Data/AppDbContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ public AppDbContext(DbContextOptions<AppDbContext> options)
1111

1212
public DbSet<TodoItem> TodoItems { get; set; }
1313
public DbSet<Person> People { get; set; }
14-
public DbSet<TodoItemCollection> TodoItemCollection { get; set; }
14+
public DbSet<TodoItemCollection> TodoItemCollections { get; set; }
1515
}
1616
}

src/JsonApiDotNetCoreExample/Migrations/20170315021529_initial.Designer.cs renamed to src/JsonApiDotNetCoreExample/Migrations/20170315140127_initial.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/JsonApiDotNetCoreExample/Migrations/20170315021529_initial.cs renamed to src/JsonApiDotNetCoreExample/Migrations/20170315140127_initial.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
2424
});
2525

2626
migrationBuilder.CreateTable(
27-
name: "TodoItemCollection",
27+
name: "TodoItemCollections",
2828
columns: table => new
2929
{
3030
Id = table.Column<Guid>(nullable: false),
@@ -33,9 +33,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
3333
},
3434
constraints: table =>
3535
{
36-
table.PrimaryKey("PK_TodoItemCollection", x => x.Id);
36+
table.PrimaryKey("PK_TodoItemCollections", x => x.Id);
3737
table.ForeignKey(
38-
name: "FK_TodoItemCollection_People_OwnerId",
38+
name: "FK_TodoItemCollections_People_OwnerId",
3939
column: x => x.OwnerId,
4040
principalTable: "People",
4141
principalColumn: "Id",
@@ -57,9 +57,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
5757
{
5858
table.PrimaryKey("PK_TodoItems", x => x.Id);
5959
table.ForeignKey(
60-
name: "FK_TodoItems_TodoItemCollection_CollectionId",
60+
name: "FK_TodoItems_TodoItemCollections_CollectionId",
6161
column: x => x.CollectionId,
62-
principalTable: "TodoItemCollection",
62+
principalTable: "TodoItemCollections",
6363
principalColumn: "Id",
6464
onDelete: ReferentialAction.Restrict);
6565
table.ForeignKey(
@@ -81,8 +81,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
8181
column: "OwnerId");
8282

8383
migrationBuilder.CreateIndex(
84-
name: "IX_TodoItemCollection_OwnerId",
85-
table: "TodoItemCollection",
84+
name: "IX_TodoItemCollections_OwnerId",
85+
table: "TodoItemCollections",
8686
column: "OwnerId");
8787
}
8888

@@ -92,7 +92,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
9292
name: "TodoItems");
9393

9494
migrationBuilder.DropTable(
95-
name: "TodoItemCollection");
95+
name: "TodoItemCollections");
9696

9797
migrationBuilder.DropTable(
9898
name: "People");

src/JsonApiDotNetCoreExample/Migrations/AppDbContextModelSnapshot.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
6565

6666
b.HasIndex("OwnerId");
6767

68-
b.ToTable("TodoItemCollection");
68+
b.ToTable("TodoItemCollections");
6969
});
7070

7171
modelBuilder.Entity("JsonApiDotNetCoreExample.Models.TodoItem", b =>

0 commit comments

Comments
 (0)