using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.Common.DTO;
using WorkFlowCheck.Common.Security;
using WorkFlowCheck.DL.Entities;

namespace WorkFlowCheck.BL.Mappings
{
    public class PasswordHashResolver : IValueResolver<UserDTO, User, string>
    {
        public string Resolve(UserDTO source, User destination, string destMember, ResolutionContext context)
        {
            return PasswordHasher.HashPassword(source.Password);
        }
    }
}
