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:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user