mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Most services are implemented as command/queries
Code cleanup
This commit is contained in:
18
ModernKeePass.Application/Recent/Models/RecentVm.cs
Normal file
18
ModernKeePass.Application/Recent/Models/RecentVm.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using AutoMapper;
|
||||
using ModernKeePass.Application.Common.Mappings;
|
||||
using ModernKeePass.Domain.Dtos;
|
||||
|
||||
namespace ModernKeePass.Application.Recent.Models
|
||||
{
|
||||
public class RecentVm: IMapFrom<FileInfo>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Path { get; set; }
|
||||
public void Mapping(Profile profile)
|
||||
{
|
||||
profile.CreateMap<FileInfo, RecentVm>()
|
||||
.ForMember(d => d.Name, opts => opts.MapFrom(s => s.Name))
|
||||
.ForMember(d => d.Path, opts => opts.MapFrom(s => s.Path));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user