SQLLite vol 1.
This commit is contained in:
@@ -1,16 +1,24 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using WorkFlowCheck.Common.DTO;
|
||||
using WorkFlowCheck.MAUI.DataLayer;
|
||||
using WorkFlowCheck.MAUI.Services;
|
||||
|
||||
namespace WorkFlowCheck.MAUI
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
private readonly AppDbContext _dbContext;
|
||||
public App(IServiceProvider serviceProvider)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
//MainPage = serviceProvider.GetRequiredService<MainPage>();
|
||||
_dbContext = serviceProvider.GetRequiredService<AppDbContext>();
|
||||
|
||||
_dbContext.Database.EnsureDeleted(); // Adatbázis törlése
|
||||
_dbContext.Database.EnsureCreated(); // Új adatbázis létrehozása
|
||||
|
||||
|
||||
MainPage = new AppShell();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user