Modified Song model, added more functionality to the Album context and store, and need to work on how album records are handled when uploading songs. I left TODO's on where to pick up. #22, #25, #29

This commit is contained in:
amazing-username
2019-05-06 20:32:34 -04:00
parent 6b4b762207
commit 66f9a05341
8 changed files with 635 additions and 467 deletions
+5 -1
View File
@@ -21,7 +21,11 @@ namespace Icarus.Models.Context
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Song>();
modelBuilder.Entity<Song>()
.HasOne(s => s.AlbumObject)
.WithMany(a => a.Songs)
.HasForeignKey(s => s.AlbumId)
.HasConstraintName("ForeignKey_Song_Album");
}
}
}