Files
StandManager/StandManager.Service/UtenteService.cs
2025-12-19 10:38:51 +01:00

28 lines
1.0 KiB
C#

using Microsoft.EntityFrameworkCore;
using OAService.Service.Repository;
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;
}
public async Task<List<Utente>> ListaCapoarea()
{
return (await _unitOfWork.UtenteRepository.RicercaQueryable(x => x.IsCapoarea, skip:0, take:0)).ToList();
/*return (await _unitOfWork.UtenteRepository.RicercaQueryable(x =>
x.Ruolo.Permessi.Any(y => y.Feature.Type == FeatureType.Capoarea || y.Feature.Type == FeatureType.AdminGlobal),
includi:x => x.Include(y => y.Ruolo).ThenInclude(z => z.Permessi).ThenInclude(u => u.Feature),
skip: 0, take: 0)).ToList();*/
}
}