diff options
| Commit | 4e75e0150d8ba9fdc82e61516b42d04dc09e9d59 (patch) | |
|---|---|---|
| Author | 2020-12-10 18:04:07 +0200 | |
| Committer | 2020-12-10 18:04:07 +0200 | |
| Files | 8c80fb72a895ad0f5fe492bc220670b95a68836f /API/Service/UserService.cs | |
| DevHive-4e75e0150d8ba9fdc82e61516b42d04dc09e9d59.tar DevHive-4e75e0150d8ba9fdc82e61516b42d04dc09e9d59.tar.gz DevHive-4e75e0150d8ba9fdc82e61516b42d04dc09e9d59.zip | ||
| Parent | c13ff5b569248c0c2f05b154eda8199e0ce96cf8 (diff) | |
Added Id in UserDto
1 files changed, 2 insertions, 6 deletions
| -rw-r--r-- | API/Service/UserService.cs | 8 |
diff --git a/API/Service/UserService.cs b/API/Service/UserService.cs index bd991dd..d84d74b 100644 --- a/API/Service/UserService.cs +++ b/API/Service/UserService.cs @@ -20,11 +20,8 @@ namespace API.Service public UserService(DevHiveContext context, IMapper mapper) { this._dbRepository = new DbRepository<User>(context); - this._userMapper = new Mapper - ( - new MapperConfiguration - (cfg => cfg.CreateMap<UserDTO, User>()) - ); + this._userMapper = new Mapper(new MapperConfiguration(cfg => + cfg.CreateMap<UserDTO, User>())); } public async Task<HttpStatusCode> CreateUser(UserDTO userDTO) @@ -46,7 +43,6 @@ namespace API.Service public async Task<HttpStatusCode> UpdateUser(int id, UserDTO userDTO) { User user = this._userMapper.Map<User>(userDTO); - user.Id = id; await this._dbRepository.EditAsync(id, user); return HttpStatusCode.OK; |
