Compare commits
1 Commits
main
...
fc9c3d025e
| Author | SHA1 | Date | |
|---|---|---|---|
| fc9c3d025e |
@@ -40,8 +40,12 @@ public class DatabaseContext : DbContext
|
||||
|
||||
public DatabaseContext()
|
||||
{
|
||||
var folder = Environment.SpecialFolder.LocalApplicationData;
|
||||
DbPath = System.IO.Path.Join("./", "database.db");
|
||||
var baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
||||
var folder = Path.Join(baseDirectory, "Data");
|
||||
if (!Directory.Exists(folder))
|
||||
Directory.CreateDirectory(folder);
|
||||
|
||||
DbPath = Path.Join(folder, "database.db");
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
||||
|
||||
Reference in New Issue
Block a user