public DataResult <UserModel> GetUserByExternalLogin(string loginProvider, string providerKey) { try { var userEntity = m_userUoW.GetUserByExternalLogin(loginProvider, providerKey); var user = m_mapper.Map <UserModel>(userEntity); return(Success(user)); } catch (NoResultException <UserEntity> e) { m_logger.LogWarning(e); return(Error <UserModel>(m_translator.Translate("invalid-external-login"), DataResultErrorCode.UserNotExistExternalLogin)); } catch (DatabaseException e) { m_logger.LogWarning(e); return(Error <UserModel>(e.Message)); } }