From d6befdd5c388eeecf9500849eacdf2ae4e3d8cc5 Mon Sep 17 00:00:00 2001 From: neozhu Date: Tue, 7 Sep 2021 15:26:41 +0800 Subject: [PATCH] WIP: update create template --- src/Templates/Commands/Create/.cs.txt | 5 ++++- src/Templates/Commands/Update/.cs.txt | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Templates/Commands/Create/.cs.txt b/src/Templates/Commands/Create/.cs.txt index f418b8f..6a4d35a 100644 --- a/src/Templates/Commands/Create/.cs.txt +++ b/src/Templates/Commands/Create/.cs.txt @@ -14,7 +14,10 @@ namespace {namespace} { public class Create{itemname}Command: {itemname}Dto,IRequest, IMapFrom<{itemname}> { - + public void Mapping(Profile profile) + { + profile.CreateMap<{itemname}, Create{itemname}Command>().ReverseMap(); + } } diff --git a/src/Templates/Commands/Update/.cs.txt b/src/Templates/Commands/Update/.cs.txt index a5b8e77..6bf13ae 100644 --- a/src/Templates/Commands/Update/.cs.txt +++ b/src/Templates/Commands/Update/.cs.txt @@ -14,10 +14,7 @@ namespace {namespace} { public class Update{itemname}Command: {itemname}Dto,IRequest, IMapFrom<{itemname}> { - public void Mapping(Profile profile) - { - profile.CreateMap<{itemname}, Update{itemname}Command>().ReverseMap(); - } + } public class Update{itemname}CommandHandler : IRequestHandler