diff options
| author | transtrike <transtrike@gmail.com> | 2020-12-10 18:04:07 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2020-12-10 18:04:07 +0200 |
| commit | 4e75e0150d8ba9fdc82e61516b42d04dc09e9d59 (patch) | |
| tree | 8c80fb72a895ad0f5fe492bc220670b95a68836f /API/Service | |
| parent | c13ff5b569248c0c2f05b154eda8199e0ce96cf8 (diff) | |
| download | DevHive-4e75e0150d8ba9fdc82e61516b42d04dc09e9d59.tar DevHive-4e75e0150d8ba9fdc82e61516b42d04dc09e9d59.tar.gz DevHive-4e75e0150d8ba9fdc82e61516b42d04dc09e9d59.zip | |
Added Id in UserDto
Diffstat (limited to 'API/Service')
| -rw-r--r-- | API/Service/UserService.cs | 8 |
1 files changed, 2 insertions, 6 deletions
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; |
