* #95: Updated Id of the CoverArt model * Model and migration changes
This commit was merged in pull request #99.
This commit is contained in:
@@ -25,28 +25,28 @@ public class SongContext : DbContext
|
||||
.Property(s => s.Year)
|
||||
.IsRequired(false);
|
||||
modelBuilder.Entity<Song>()
|
||||
.Property(s => s.GenreID)
|
||||
.Property(s => s.GenreId)
|
||||
.IsRequired(false);
|
||||
modelBuilder.Entity<Song>()
|
||||
.Property(s => s.ArtistID)
|
||||
.Property(s => s.ArtistId)
|
||||
.IsRequired(false);
|
||||
modelBuilder.Entity<Song>()
|
||||
.Property(s => s.AlbumID)
|
||||
.Property(s => s.AlbumId)
|
||||
.IsRequired(false);
|
||||
modelBuilder.Entity<Song>()
|
||||
.Property(s => s.CoverArtID)
|
||||
.Property(s => s.CoverArtId)
|
||||
.IsRequired(false);
|
||||
}
|
||||
|
||||
|
||||
public Song RetrieveRecord(Song song)
|
||||
{
|
||||
return Songs.FirstOrDefault(sng => sng.SongID == song.SongID);
|
||||
return Songs.FirstOrDefault(sng => sng.Id == song.Id);
|
||||
}
|
||||
|
||||
|
||||
public bool DoesRecordExist(Song song)
|
||||
{
|
||||
return Songs.FirstOrDefault(sng => sng.SongID == song.SongID) != null ? true : false;
|
||||
return Songs.FirstOrDefault(sng => sng.Id == song.Id) != null ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user