Add QueryWindow
This commit is contained in:
@ -45,6 +45,8 @@ namespace Elwig.Helpers {
|
||||
public DateTime SavedLastWriteTime { get; private set; }
|
||||
public bool HasBackendChanged => SavedLastWriteTime != LastWriteTime;
|
||||
|
||||
public static string ConnectionString => $"Data Source=\"{App.Config.DatabaseFile}\"; Foreign Keys=True; Mode=ReadWrite; Cache=Default";
|
||||
|
||||
public AppDbContext() {
|
||||
if (App.Config.DatabaseLog != null) {
|
||||
try {
|
||||
@ -62,7 +64,7 @@ namespace Elwig.Helpers {
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {
|
||||
optionsBuilder.UseSqlite($"Data Source=\"{App.Config.DatabaseFile}\"; Foreign Keys=True; Mode=ReadWrite; Cache=Default");
|
||||
optionsBuilder.UseSqlite(ConnectionString);
|
||||
optionsBuilder.UseLazyLoadingProxies();
|
||||
optionsBuilder.LogTo(Log, LogLevel.Information);
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
|
Reference in New Issue
Block a user