#93: Reduce build errors

This commit is contained in:
kdeng00
2024-07-27 13:08:58 -04:00
parent 6898776f5b
commit 37441fea45
41 changed files with 286 additions and 277 deletions
+5 -3
View File
@@ -6,7 +6,9 @@ namespace Icarus.Database.Contexts;
public class CoverArtContext : DbContext
{
public DbSet<CoverArt> CoverArtImages { get; set; }
#region Properties
public DbSet<CoverArt>? CoverArtImages { get; set; }
#endregion
public CoverArtContext(DbContextOptions<CoverArtContext> options) : base(options) { }
public CoverArtContext(string connString) : base(new DbContextOptionsBuilder<CoverArtContext>()
@@ -22,11 +24,11 @@ public class CoverArtContext : DbContext
public CoverArt RetrieveRecord(CoverArt cover)
{
return CoverArtImages.FirstOrDefault(cov => cov.Id == cover.Id);
return CoverArtImages!.FirstOrDefault(cov => cov.Id == cover.Id)!;
}
public bool DoesRecordExist(CoverArt cover)
{
return CoverArtImages.FirstOrDefault(cov => cov.Id == cover.Id) != null ? true : false;
return CoverArtImages!.FirstOrDefault(cov => cov.Id == cover.Id) != null ? true : false;
}
}