Build hierarchy instead of using Automapper

Add entities before removing them
This commit is contained in:
Geoffroy BONNEVILLE
2020-04-01 12:48:36 +02:00
parent 90c592d7ee
commit 57be6bb917
22 changed files with 84 additions and 77 deletions

View File

@@ -28,7 +28,7 @@ namespace ModernKeePass.Application.Database.Queries.GetDatabase
if (database.IsOpen)
{
database.Name = _databaseProxy.Name;
database.RootGroup = _mapper.Map<GroupVm>(_databaseProxy.RootGroup);
database.RootGroup = GroupVm.BuildHierarchy(null, _databaseProxy.RootGroup, _mapper);
database.IsRecycleBinEnabled = _databaseProxy.IsRecycleBinEnabled;
database.RecycleBin = _mapper.Map<GroupVm>(_databaseProxy.RecycleBin);
database.Compression = _databaseProxy.Compression;