Completed all TODO tasks, what's left is to go over the code and do some cleanup regarding the album API functonality. #22, #25

This commit is contained in:
amazing-username
2019-05-08 22:06:19 -04:00
parent 677646bb62
commit f7d6580253
10 changed files with 110 additions and 66 deletions
+2 -1
View File
@@ -22,7 +22,8 @@ namespace Icarus.Models.Context
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Song>()
.HasOne(s => s.AlbumObject)
.ToTable("Song")
.HasOne(s => s.Album)
.WithMany(a => a.Songs)
.HasForeignKey(s => s.AlbumId)
.HasConstraintName("ForeignKey_Song_Album");