Add QueryWindow
This commit is contained in:
1 parent
592df9e56d
commit
8c0df674ec
5 files changed
+88
-4
No files matched your search
@@ -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