Handle entities with id

No hierarchy is built anymore
WIP save issues after delete
This commit is contained in:
Geoffroy BONNEVILLE
2020-04-02 19:12:16 +02:00
parent b61a9652d1
commit 36aa8914fa
26 changed files with 213 additions and 96 deletions

View File

@@ -12,6 +12,7 @@ namespace ModernKeePass.Application.Group.Models
public class GroupVm: IEntityVm, ISelectableModel, IMapFrom<GroupEntity>
{
public string ParentGroupId { get; set; }
public string ParentGroupName { get; set; }
public string Id { get; set; }
public string Title { get; set; }
public Icon Icon { get; set; }
@@ -29,12 +30,13 @@ namespace ModernKeePass.Application.Group.Models
{
profile.CreateMap<GroupEntity, GroupVm>()
.ForMember(d => d.ParentGroupId, opts => opts.MapFrom(s => s.ParentId))
.ForMember(d => d.ParentGroupName, opts => opts.MapFrom(s => s.ParentName))
.ForMember(d => d.Id, opts => opts.MapFrom(s => s.Id))
.ForMember(d => d.Title, opts => opts.MapFrom(s => s.Name))
.ForMember(d => d.Icon, opts => opts.MapFrom(s => s.Icon))
.ForMember(d => d.Entries, opts => opts.MapFrom(s => s.Entries))
.ForMember(d => d.SubGroups, opts => opts.MapFrom(s => s.SubGroups))
.MaxDepth(1);
.MaxDepth(2);
}
}
}