Website Summary Files Commits Branches @commit @diff @stats
path: root / API / Service / UserService.cs
diff options
context:
space:
mode:
Commitaa1f51c5988926fb3b3e35df4904f60ecae10686 (patch)
Author
 transtrike <transtrike@gmail.com>
2020-12-10 18:07:56 +0200
Committer
 transtrike <transtrike@gmail.com>
2020-12-10 18:07:56 +0200
Filese304a7618bf6b9ee4ccc611bdcbc68d11649380f /API/Service/UserService.cs
DevHive-aa1f51c5988926fb3b3e35df4904f60ecae10686.tar
DevHive-aa1f51c5988926fb3b3e35df4904f60ecae10686.tar.gz
DevHive-aa1f51c5988926fb3b3e35df4904f60ecae10686.zip
Parent4e75e0150d8ba9fdc82e61516b42d04dc09e9d59 (diff)
Playing with the mapper
1 files changed, 2 insertions, 3 deletions
-rw-r--r--API/Service/UserService.cs5
diff --git a/API/Service/UserService.cs b/API/Service/UserService.cs
index d84d74b..ce90d0c 100644
--- a/API/Service/UserService.cs
+++ b/API/Service/UserService.cs
@@ -17,11 +17,10 @@ namespace API.Service
private readonly DbRepository<User> _dbRepository;
private readonly Mapper _userMapper;
- public UserService(DevHiveContext context, IMapper mapper)
+ public UserService(DevHiveContext context, Mapper mapper)
{
this._dbRepository = new DbRepository<User>(context);
- this._userMapper = new Mapper(new MapperConfiguration(cfg =>
- cfg.CreateMap<UserDTO, User>()));
+ this._userMapper = mapper;
}
public async Task<HttpStatusCode> CreateUser(UserDTO userDTO)