using AutoMapper; using DigitalData.Core.Application; using DigitalData.Core.Contracts.Application; using DigitalData.Core.Contracts.CultureServices; using DigitalData.UserManager.Application.Contracts; using DigitalData.UserManager.Application.DTOs.UserRep; using DigitalData.UserManager.Domain.Entities; using DigitalData.UserManager.Infrastructure.Contracts; namespace DigitalData.UserManager.Application.Services { public class UserRepService : CRUDService, IUserRepService { public UserRepService(IUserRepRepository repository, IKeyTranslationService translationService, IMapper mapper) : base(repository, translationService, mapper) { } public async Task>> ReadAllAsync(bool withUser = false, bool withRepGroup = false, bool withRightGroup = false, bool withRepUser = false, int? userId = null) { var urs = await _repository.ReadAllAsync(withUser, withRepGroup, withRightGroup, withRepUser, userId); var urReadDTOs = _mapper.MapOrThrow>(urs); return Successful(urReadDTOs); } } }