|
|
@ -16,6 +16,8 @@ public partial class DbDataManager: IDataManager
|
|
|
|
public DbDataManager(HeartTrackContext dbContext)
|
|
|
|
public DbDataManager(HeartTrackContext dbContext)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DbContext = dbContext;
|
|
|
|
DbContext = dbContext;
|
|
|
|
|
|
|
|
DbContext.Database.EnsureCreated();
|
|
|
|
|
|
|
|
Console.WriteLine($"Database created Context: {DbContext.Database.EnsureCreated()}");
|
|
|
|
ActivityRepo = new ActivityRepository(this);
|
|
|
|
ActivityRepo = new ActivityRepository(this);
|
|
|
|
UserRepo = new UserRepository(this);
|
|
|
|
UserRepo = new UserRepository(this);
|
|
|
|
DbContext.Database.EnsureCreated();
|
|
|
|
DbContext.Database.EnsureCreated();
|
|
|
@ -27,12 +29,14 @@ public partial class DbDataManager: IDataManager
|
|
|
|
: this(new HeartTrackContext(dbPlatformPath))
|
|
|
|
: this(new HeartTrackContext(dbPlatformPath))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DbContext.Database.EnsureCreated();
|
|
|
|
DbContext.Database.EnsureCreated();
|
|
|
|
Console.WriteLine($"Database created: {DbContext.Database.EnsureCreated()}"); }
|
|
|
|
Console.WriteLine($"Database created String: {DbContext.Database.EnsureCreated()}"); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DbDataManager()
|
|
|
|
public DbDataManager()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DbContext = new HeartTrackContext();
|
|
|
|
DbContext = new HeartTrackContext();
|
|
|
|
|
|
|
|
DbContext.Database.EnsureCreated();
|
|
|
|
|
|
|
|
Console.WriteLine($"Database created None: {DbContext.Database.EnsureCreated()}");
|
|
|
|
ActivityRepo = new ActivityRepository(this);
|
|
|
|
ActivityRepo = new ActivityRepository(this);
|
|
|
|
UserRepo= new UserRepository(this);
|
|
|
|
UserRepo= new UserRepository(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|