Resolve "Component: Text Element Navigator" #67

Merged
thorsten merged 43 commits from 11-component-text-element-navigator into main 2022-07-23 19:29:16 +00:00
Showing only changes of commit 3ef7bf1784 - Show all commits
+6 -1
View File
@@ -11,6 +11,10 @@ public static class Setup
private const string DB_READ_WRITE_MODE = "ReadWrite";
private const string DB_READ_WRITE_CREATE_MODE = "ReadWriteCreate";
private static string usedDataFile = string.Empty;
public static string DataFile => Setup.usedDataFile;
/// <summary>
/// Tries to migrate the data file.
/// </summary>
@@ -30,7 +34,8 @@ public static class Setup
/// </summary>
public static void AddDatabase(this IServiceCollection serviceCollection, string path2DataFile, bool createWhenNecessary = true)
{
serviceCollection.AddDbContext<DataContext>(options => options.UseSqlite($"Filename={path2DataFile};Mode={(createWhenNecessary ? DB_READ_WRITE_CREATE_MODE : DB_READ_WRITE_MODE)}"), ServiceLifetime.Transient);
Setup.usedDataFile = path2DataFile;
serviceCollection.AddDbContext<DataContext>(options => options.UseSqlite($"Filename={path2DataFile};Mode={(createWhenNecessary ? DB_READ_WRITE_CREATE_MODE : DB_READ_WRITE_MODE)};"), ServiceLifetime.Transient);
}
/// <summary>