Implemetato databese locale con EntityFramework

This commit is contained in:
2026-02-17 17:40:33 +01:00
parent 544c9e8237
commit e7357bd78a
45 changed files with 989 additions and 119 deletions

View File

@@ -3,16 +3,19 @@ using SteUp.Shared.Core.Data.Contracts;
using SteUp.Shared.Core.Dto;
using SteUp.Shared.Core.Dto.PageState;
using SteUp.Shared.Core.Interface.IntegryApi;
using SteUp.Shared.Core.Interface.LocalDb;
namespace SteUp.Shared.Core.Data;
public class SteupDataService(
IIntegrySteupService integrySteupService,
IUserSession userSession) : ISteupDataService
IUserSession userSession,
IDbInitializer dbInitializer) : ISteupDataService
{
public Task Init()
public async Task Init()
{
return LoadDataAsync();
await dbInitializer.InitializeAsync();
await LoadDataAsync();
}
private async Task LoadDataAsync()
@@ -24,7 +27,7 @@ public class SteupDataService(
TipiAttività = await integrySteupService.RetrieveActivityType();
}
public InspectionPageState Inspection { get; set; } = new();
public InspectionPageState InspectionPageState { get; set; } = new();
public List<PuntoVenditaDto> PuntiVenditaList { get; private set; } = [];
public List<JtbFasiDto> Reparti { get; private set; } = [];
public List<StbActivityTypeDto> TipiAttività { get; private set; } = [];