This commit is contained in:
2025-12-01 09:56:00 +01:00
commit b1bd4f01b6
2237 changed files with 2624728 additions and 0 deletions

View File

@ -0,0 +1,6 @@
namespace StandManager.Service.Interfaces;
public interface IManagerService
{
public IUtenteService UtenteService { get; set; }
}

View File

@ -0,0 +1,9 @@
using OAService.Service.Servizi.Interfacce;
using StandManager.Domain.Entita;
namespace StandManager.Service.Interfaces;
public interface IUtenteService : ITService<Utente>
{
}

View File

@ -0,0 +1,13 @@
using StandManager.Service.Interfaces;
namespace StandManager.Service;
public class ManagerService : IManagerService
{
public ManagerService(IUtenteService utenteService)
{
UtenteService = utenteService;
}
public IUtenteService UtenteService { get; set; }
}

View File

@ -0,0 +1,8 @@
using OAService.Service.Repository;
namespace StandManager.Service.Repository;
public interface IStandManagerGenericRepository<T> : IGenericRepository<T> where T : class
{
}

View File

@ -0,0 +1,9 @@
using OAService.Service.Repository;
using StandManager.Domain.Entita;
namespace StandManager.Service.Repository;
public interface IStandManagerUnitOfWork : IUnitOfWork
{
public IStandManagerGenericRepository<Utente> UtenteRepository { get; }
}

View File

@ -0,0 +1,11 @@
using OAService.Infrastructure.DAL.Repository;
using StandManager.Infrastructure.DAL.Context;
namespace StandManager.Service.Repository;
public class StandManagerGenericRepository<T> : GenericRepository<T>, IStandManagerGenericRepository<T> where T : class
{
public StandManagerGenericRepository(StandManagerDbContext context) : base(context)
{
}
}

View File

@ -0,0 +1,27 @@
using Microsoft.Extensions.DependencyInjection;
using OAService.Infrastructure.DAL.Repository;
using StandManager.Domain.Entita;
using StandManager.Infrastructure.DAL.Context;
namespace StandManager.Service.Repository;
public class StandManagerUnitOfWork : UnitOfWork, IStandManagerUnitOfWork
{
private readonly StandManagerDbContext _context;
private readonly IServiceProvider _provider;
public StandManagerUnitOfWork(StandManagerDbContext context, IServiceProvider provider) : base(context, provider)
{
_context = context;
_provider = provider;
}
public override IStandManagerGenericRepository<TEntity> GetRepository<TEntity>() where TEntity : class
{
return _provider.GetRequiredService<IStandManagerGenericRepository<TEntity>>();
}
private IStandManagerGenericRepository<Utente> _utenteRepository;
public new IStandManagerGenericRepository<Utente> UtenteRepository => _utenteRepository ??= new StandManagerGenericRepository<Utente>(_context);
}

View File

@ -0,0 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.21"/>
</ItemGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="wwwroot\background.png" />
<_ContentIncludedByDefault Remove="wwwroot\exampleJsInterop.js" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StandManager.Domain\StandManager.Domain.csproj" />
<ProjectReference Include="..\StandManager.Infrastructure\StandManager.Infrastructure.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="OAService.Domain">
<HintPath>..\Libs\OAService.Domain.dll</HintPath>
</Reference>
<Reference Include="OAService.Infrastructure">
<HintPath>..\Libs\OAService.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="OAService.Service">
<HintPath>..\Libs\OAService.Service.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

View File

@ -0,0 +1,16 @@
using OAService.Service.Servizi.Implementazioni;
using StandManager.Domain.Entita;
using StandManager.Service.Interfaces;
using StandManager.Service.Repository;
namespace StandManager.Service;
public class UtenteService : TService<Utente>, IUtenteService
{
private readonly IStandManagerUnitOfWork _unitOfWork;
public UtenteService(IStandManagerUnitOfWork unitOfWork) : base(unitOfWork)
{
_unitOfWork = unitOfWork;
}
}