From 596e23bfc9f260eaafa69fcd7038b7f1ee27c1cd Mon Sep 17 00:00:00 2001 From: dave Date: Thu, 14 Mar 2024 18:39:37 +0100 Subject: [PATCH] log --- src/Model2Entities/DbDataManager.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Model2Entities/DbDataManager.cs b/src/Model2Entities/DbDataManager.cs index 0b12032..42f274b 100644 --- a/src/Model2Entities/DbDataManager.cs +++ b/src/Model2Entities/DbDataManager.cs @@ -16,6 +16,8 @@ public partial class DbDataManager: IDataManager public DbDataManager(HeartTrackContext dbContext) { DbContext = dbContext; + DbContext.Database.EnsureCreated(); + Console.WriteLine($"Database created Context: {DbContext.Database.EnsureCreated()}"); ActivityRepo = new ActivityRepository(this); UserRepo = new UserRepository(this); DbContext.Database.EnsureCreated(); @@ -27,12 +29,14 @@ public partial class DbDataManager: IDataManager : this(new HeartTrackContext(dbPlatformPath)) { DbContext.Database.EnsureCreated(); - Console.WriteLine($"Database created: {DbContext.Database.EnsureCreated()}"); } + Console.WriteLine($"Database created String: {DbContext.Database.EnsureCreated()}"); } public DbDataManager() { DbContext = new HeartTrackContext(); + DbContext.Database.EnsureCreated(); + Console.WriteLine($"Database created None: {DbContext.Database.EnsureCreated()}"); ActivityRepo = new ActivityRepository(this); UserRepo= new UserRepository(this); }