Rough version of Saving Series, Volumes, and MangaFiles to the DB. Relies on Cascaded delete rather than manually handling updating of file changes.
This commit is contained in:
parent
104c63b2b9
commit
380c3e7b3c
16 changed files with 949 additions and 15 deletions
|
|
@ -14,6 +14,9 @@ namespace API.Data
|
|||
|
||||
}
|
||||
public DbSet<Library> Library { get; set; }
|
||||
public DbSet<Series> Series { get; set; }
|
||||
public DbSet<Volume> Volume { get; set; }
|
||||
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
|
|
@ -30,6 +33,12 @@ namespace API.Data
|
|||
.WithOne(u => u.Role)
|
||||
.HasForeignKey(ur => ur.RoleId)
|
||||
.IsRequired();
|
||||
|
||||
// builder.Entity<Library>()
|
||||
// .HasMany(s => s.Series)
|
||||
// .WithOne(l => l.Library)
|
||||
// .HasForeignKey(x => x.Id)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue