mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-02-12 10:58:30 -05:00
Update to .NET Core 3.1 and apply Roslyn suggestions
This commit is contained in:
@@ -38,7 +38,7 @@ namespace ChrisKaczor.HomeMonitor.Power.Service.Data
|
||||
var databaseExists = (bool?)command.ExecuteScalar();
|
||||
|
||||
// Create database if needed
|
||||
if (!databaseExists.GetValueOrDefault(false))
|
||||
if (!(databaseExists ?? false))
|
||||
{
|
||||
command.CommandText = $"CREATE DATABASE {_configuration["Power:Database:Name"]}";
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
Reference in New Issue
Block a user