Add AutoMapper profile for CreateResultViewCommand mapping
Introduced a MappingProfile in ReC.Application.ResultViews to map CreateResultViewCommand to ResultView, setting AddedWhen to DateTime.UtcNow during mapping. Included necessary using directives.
This commit is contained in:
13
src/ReC.Application/ResultViews/MappingProfile.cs
Normal file
13
src/ReC.Application/ResultViews/MappingProfile.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using ReC.Application.ResultViews.Commands;
|
||||||
|
using ReC.Domain.Entities;
|
||||||
|
|
||||||
|
namespace ReC.Application.ResultViews;
|
||||||
|
|
||||||
|
public class MappingProfile : AutoMapper.Profile
|
||||||
|
{
|
||||||
|
public MappingProfile()
|
||||||
|
{
|
||||||
|
CreateMap<CreateResultViewCommand, ResultView>()
|
||||||
|
.ForMember(e => e.AddedWhen, exp => exp.MapFrom(cmd => DateTime.UtcNow));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user