refactor(core): DTOs und Services an Core 2.0.0.0 angepasst
This commit is contained in:
@@ -5,13 +5,12 @@ using DigitalData.UserManager.Application.Contracts;
|
||||
using DigitalData.UserManager.Application.DTOs.ModuleOfUser;
|
||||
using DigitalData.UserManager.Domain.Entities;
|
||||
using DigitalData.UserManager.Infrastructure.Contracts;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
namespace DigitalData.UserManager.Application.Services
|
||||
{
|
||||
public class ModuleOfUserService : CRUDService<IModuleOfUserRepository, ModuleOfUserCreateDto, ModuleOfUserReadDto, ModuleOfUserUpdateDto, ModuleOfUser, int>, IModuleOfUserService
|
||||
{
|
||||
public ModuleOfUserService(IModuleOfUserRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper) : base(repository, mapper)
|
||||
public ModuleOfUserService(IModuleOfUserRepository repository, IMapper mapper) : base(repository, mapper)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -30,7 +29,7 @@ namespace DigitalData.UserManager.Application.Services
|
||||
public async Task<DataResult<IEnumerable<ModuleOfUserReadDto>>> ReadByUserAsync(string username)
|
||||
{
|
||||
var mous = await _repository.ReadByUserAsync(username: username);
|
||||
var mous_dtos = _mapper.MapOrThrow<IEnumerable<ModuleOfUserReadDto>>(mous);
|
||||
var mous_dtos = _mapper.Map<IEnumerable<ModuleOfUserReadDto>>(mous);
|
||||
return Result.Success(mous_dtos);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user