Skip to content

Commit 0996291

Browse files
committed
move operations AppDbContext into the shared JsonDotNetCoreExample project
having a single db makes CI easier to configure
1 parent 86cabe9 commit 0996291

35 files changed

+246
-818
lines changed

src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using JsonApiDotNetCoreExample.Models;
1+
using JsonApiDotNetCoreExample.Models;
22
using JsonApiDotNetCore.Models;
33
using Microsoft.EntityFrameworkCore;
44

@@ -14,12 +14,12 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
1414
{
1515
modelBuilder.Entity<TodoItem>()
1616
.Property(t => t.CreatedDate).HasDefaultValueSql("CURRENT_TIMESTAMP").IsRequired();
17-
17+
1818
modelBuilder.Entity<TodoItem>()
1919
.HasOne(t => t.Assignee)
2020
.WithMany(p => p.AssignedTodoItems)
2121
.HasForeignKey(t => t.AssigneeId);
22-
22+
2323
modelBuilder.Entity<TodoItem>()
2424
.HasOne(t => t.Owner)
2525
.WithMany(p => p.TodoItems)
@@ -34,5 +34,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
3434

3535
[Resource("camelCasedModels")]
3636
public DbSet<CamelCasedModel> CamelCasedModels { get; set; }
37+
38+
public DbSet<Article> Articles { get; set; }
39+
public DbSet<Author> Authors { get; set; }
3740
}
3841
}

src/Examples/JsonApiDotNetCoreExample/Migrations/20170315140127_initial.Designer.cs

Lines changed: 0 additions & 92 deletions
This file was deleted.

src/Examples/JsonApiDotNetCoreExample/Migrations/20170330020650_AddAssignedTodoItems.Designer.cs

Lines changed: 0 additions & 100 deletions
This file was deleted.

src/Examples/JsonApiDotNetCoreExample/Migrations/20170330020650_AddAssignedTodoItems.cs

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/Examples/JsonApiDotNetCoreExample/Migrations/20170330234539_AddGuidProperty.Designer.cs

Lines changed: 0 additions & 102 deletions
This file was deleted.

src/Examples/JsonApiDotNetCoreExample/Migrations/20170330234539_AddGuidProperty.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)