fix: create db next to dll
This commit is contained in:
@@ -15,9 +15,9 @@ class AppDbContext(IOptionsSnapshot<DbOptions> options) : DbContext, IDisposable
|
|||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
{
|
{
|
||||||
var folder = Environment.SpecialFolder.LocalApplicationData;
|
var folder = Assembly.GetExecutingAssembly().Location;
|
||||||
var path = Environment.GetFolderPath(folder);
|
var path = Path.GetDirectoryName(folder);
|
||||||
var dataDir = Path.Combine(path, "SanctionsSearch", "Data");
|
var dataDir = Path.Combine(path!, "Data");
|
||||||
|
|
||||||
if (Directory.Exists(dataDir) == false)
|
if (Directory.Exists(dataDir) == false)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user