From aa1f51c5988926fb3b3e35df4904f60ecae10686 Mon Sep 17 00:00:00 2001 From: transtrike Date: Thu, 10 Dec 2020 18:07:56 +0200 Subject: Playing with the mapper --- API/Service/UserService.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'API/Service') 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 _dbRepository; private readonly Mapper _userMapper; - public UserService(DevHiveContext context, IMapper mapper) + public UserService(DevHiveContext context, Mapper mapper) { this._dbRepository = new DbRepository(context); - this._userMapper = new Mapper(new MapperConfiguration(cfg => - cfg.CreateMap())); + this._userMapper = mapper; } public async Task CreateUser(UserDTO userDTO) -- cgit v1.2.3