refactor(core): DTOs und Services an Core 2.0.0.0 angepasst

This commit is contained in:
Developer 02
2024-09-20 00:53:28 +02:00
parent 8d88148b98
commit 9458ffae42
17 changed files with 39 additions and 44 deletions

View File

@@ -1,5 +1,4 @@
using AutoMapper;
using DigitalData.Core.Application;
using DigitalData.Core.DTO;
using DigitalData.UserManager.Application.Contracts;
using DigitalData.UserManager.Application.DTOs.GroupOfUser;
@@ -47,7 +46,7 @@ namespace DigitalData.UserManager.Application.Services
entities = await _repository.ReadAllAsync();
}
var gouReadDtos = _mapper.MapOrThrow<IEnumerable<GroupOfUserReadDto>>(entities);
var gouReadDtos = _mapper.Map<IEnumerable<GroupOfUserReadDto>>(entities);
return Result.Success(gouReadDtos);
}
@@ -66,7 +65,7 @@ namespace DigitalData.UserManager.Application.Services
public async Task<DataResult<IEnumerable<GroupOfUserReadDto>>> ReadByUsernameAsync(string username)
{
var groups = await _repository.ReadByUsernameAsync(username);
var groupDtos = _mapper.MapOrThrow<IEnumerable<GroupOfUserReadDto>>(groups);
var groupDtos = _mapper.Map<IEnumerable<GroupOfUserReadDto>>(groups);
return Result.Success(groupDtos);
}
}