Removed strongly typed inventory objects
Added EAV inventory types Added EAV object handling philosophy Added controllers Added EF Core migration integration
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Serilog.Core;
|
||||
using WyvernInventory.Infrastructure.Data;
|
||||
|
||||
namespace WyvernInventory.Infrastructure.Utils;
|
||||
|
||||
public static class DbUtils
|
||||
{
|
||||
public static bool CanConnectToDatabase(DBContext db, ILogger<Logger> logger)
|
||||
{
|
||||
if (db.Database.CanConnect())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
logger.LogCritical("Unable to connect to DB");
|
||||
|
||||
Environment.Exit(1);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user