diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-13 15:05:53 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-13 15:05:53 +0300 |
| commit | ef163726a5444ba0cbc631f74730184172c1c486 (patch) | |
| tree | d7d60837bb093c4256ad6506bc10ab981dafd491 /ExamTemplate/Web | |
| parent | 19bb4631a7c0b57c8da19ca7aa89864ac1555836 (diff) | |
| download | it-kariera-exam-template-ef163726a5444ba0cbc631f74730184172c1c486.tar it-kariera-exam-template-ef163726a5444ba0cbc631f74730184172c1c486.tar.gz it-kariera-exam-template-ef163726a5444ba0cbc631f74730184172c1c486.zip | |
Implemented BaseService that uses generics to implement very basic CRUD; Moved away from 3 service model to 1 service model in add feature script
Diffstat (limited to 'ExamTemplate/Web')
| -rw-r--r-- | ExamTemplate/Web/Configurations/ControllerUserMappings.cs | 2 | ||||
| -rw-r--r-- | ExamTemplate/Web/Controllers/AccountController.cs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ExamTemplate/Web/Configurations/ControllerUserMappings.cs b/ExamTemplate/Web/Configurations/ControllerUserMappings.cs index 0a797af..9b798e6 100644 --- a/ExamTemplate/Web/Configurations/ControllerUserMappings.cs +++ b/ExamTemplate/Web/Configurations/ControllerUserMappings.cs @@ -12,7 +12,7 @@ namespace ExamTemplate.Services.Configurations CreateMap<LoginUserViewModel, LoginUserServiceModel>(); CreateMap<UserServiceModel, UserViewModel>(); CreateMap<UserServiceModel, EditUserViewModel>(); - CreateMap<EditUserViewModel, EditUserServiceModel>(); + CreateMap<EditUserViewModel, UserServiceModel>(); } } } diff --git a/ExamTemplate/Web/Controllers/AccountController.cs b/ExamTemplate/Web/Controllers/AccountController.cs index b7a1207..414304f 100644 --- a/ExamTemplate/Web/Controllers/AccountController.cs +++ b/ExamTemplate/Web/Controllers/AccountController.cs @@ -117,8 +117,8 @@ namespace ExamTemplate.Web.Controllers UserServiceModel loggedInUser = await this._userService.GetUserByClaimsAsync(HttpContext.User); - EditUserServiceModel editUserServiceModel = this._autoMapper.Map<EditUserServiceModel>(editUserViewModel); - bool result = await this._userService.EditUserAsync(HttpContext.User, editUserServiceModel); + UserServiceModel userServiceModel = this._autoMapper.Map<UserServiceModel>(editUserViewModel); + bool result = await this._userService.EditUserAsync(HttpContext.User, userServiceModel); if (result) { |
