From 4e75e0150d8ba9fdc82e61516b42d04dc09e9d59 Mon Sep 17 00:00:00 2001 From: transtrike Date: Thu, 10 Dec 2020 18:04:07 +0200 Subject: Added Id in UserDto --- API/Service/UserService.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'API/Service/UserService.cs') 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(context); - this._userMapper = new Mapper - ( - new MapperConfiguration - (cfg => cfg.CreateMap()) - ); + this._userMapper = new Mapper(new MapperConfiguration(cfg => + cfg.CreateMap())); } public async Task CreateUser(UserDTO userDTO) @@ -46,7 +43,6 @@ namespace API.Service public async Task UpdateUser(int id, UserDTO userDTO) { User user = this._userMapper.Map(userDTO); - user.Id = id; await this._dbRepository.EditAsync(id, user); return HttpStatusCode.OK; -- cgit v1.2.3