public void AddUser(NewUserModel user)
        {
            user.Password = CriptingService.HashPassword(user.Password);
            var entity = MapperService.Instance.Map <NewUserModel, User>(user);

            uow.UserRepository.Create(entity);

            uow.Commit();
        }
        private bool AreValidCredentials(Credentials creds, User model)
        {
            var password = CriptingService.HashPassword(creds.Password);

            return(creds.Login == model.Login && model.Password == password && !model.IsDeleted);
        }