diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-11 12:03:11 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-11 12:03:11 +0300 |
| commit | 1691baf054b6695da35c9d29032d9b3934c1f979 (patch) | |
| tree | 056e4db62f591acf4ce4ad259a7b7245e02ede4a | |
| parent | 3edb4619a64e26883b752427b179d04ec30adef7 (diff) | |
| download | it-kariera-exam-template-1691baf054b6695da35c9d29032d9b3934c1f979.tar it-kariera-exam-template-1691baf054b6695da35c9d29032d9b3934c1f979.tar.gz it-kariera-exam-template-1691baf054b6695da35c9d29032d9b3934c1f979.zip | |
Renamed mapping classes to have the name of their layer
| -rw-r--r-- | ExamTemplate/Services/Configurations/ServiceUserMappings.cs (renamed from ExamTemplate/Services/Configurations/UserMappings.cs) | 4 | ||||
| -rw-r--r-- | ExamTemplate/Web/Configurations/ControllerUserMappings.cs (renamed from ExamTemplate/Web/Configurations/UserMappings.cs) | 4 | ||||
| -rwxr-xr-x | tools/add-feature-template.sh | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/ExamTemplate/Services/Configurations/UserMappings.cs b/ExamTemplate/Services/Configurations/ServiceUserMappings.cs index acb3ae4..787b90f 100644 --- a/ExamTemplate/Services/Configurations/UserMappings.cs +++ b/ExamTemplate/Services/Configurations/ServiceUserMappings.cs @@ -4,9 +4,9 @@ using ExamTemplate.Services.Models.User; namespace ExamTemplate.Services.Configurations { - public class UserMappings : Profile + public class ServiceUserMappings : Profile { - public UserMappings() + public ServiceUserMappings() { CreateMap<RegisterUserServiceModel, User>(); CreateMap<User, UserServiceModel>(); diff --git a/ExamTemplate/Web/Configurations/UserMappings.cs b/ExamTemplate/Web/Configurations/ControllerUserMappings.cs index 3f0f22c..0a797af 100644 --- a/ExamTemplate/Web/Configurations/UserMappings.cs +++ b/ExamTemplate/Web/Configurations/ControllerUserMappings.cs @@ -4,9 +4,9 @@ using ExamTemplate.Web.Models.User; namespace ExamTemplate.Services.Configurations { - public class UserMappings : Profile + public class ControllerUserMappings : Profile { - public UserMappings() + public ControllerUserMappings() { CreateMap<RegisterUserViewModel, RegisterUserServiceModel>(); CreateMap<LoginUserViewModel, LoginUserServiceModel>(); diff --git a/tools/add-feature-template.sh b/tools/add-feature-template.sh index 9fea26a..d283563 100755 --- a/tools/add-feature-template.sh +++ b/tools/add-feature-template.sh @@ -169,16 +169,16 @@ done subdir="${dir}/Configurations" mappings=("Create${feature_name}ServiceModel, $feature_name" "$feature_name, ${feature_name}ServiceModel" "Edit${feature_name}ServiceModel, $feature_name") -cat > $subdir/${feature_name}Mappings.cs<< EOF +cat > $subdir/Service${feature_name}Mappings.cs<< EOF using AutoMapper; using $project_name.Data.Models; using $project_name.Services.Models.$feature_name; namespace $project_name.Services.Configurations { - public class ${feature_name}Mappings : Profile + public class Service${feature_name}Mappings : Profile { - public ${feature_name}Mappings() + public Service${feature_name}Mappings() { $( for map in "${mappings[@]}"; do @@ -439,16 +439,16 @@ EOF subdir="${dir}/Configurations" mappings=("${feature_name}ServiceModel, ${feature_name}ViewModel" "Create${feature_name}ViewModel, Create${feature_name}ServiceModel" "${feature_name}ServiceModel, Edit${feature_name}ViewModel" "Edit${feature_name}ViewModel, Edit${feature_name}ServiceModel") -cat > $subdir/${feature_name}Mappings.cs<< EOF +cat > $subdir/Controller${feature_name}Mappings.cs<< EOF using AutoMapper; using $project_name.Services.Models.$feature_name; using $project_name.Web.Models.$feature_name; namespace $project_name.Web.Configurations { - public class ${feature_name}Mappings : Profile + public class Controller${feature_name}Mappings : Profile { - public ${feature_name}Mappings() + public Controller${feature_name}Mappings() { $( for map in "${mappings[@]}"; do |
