public DataResult <bool> DeleteExternalLoginByUser(int userId, int externalLoginId) { try { var externalLoginEntity = m_userUoW.GetExternalLoginByUserAndLoginId( userId, externalLoginId ); if (externalLoginEntity.Provider.DisableManagingByUser) { const string errorMessage = "Edit this link is not permitted"; m_logger.LogWarning(errorMessage); return(Error <bool>(errorMessage)); } m_userUoW.DeleteExternalLogin(userId, externalLoginId); return(Success(true)); } catch (DatabaseException e) { m_logger.LogWarning(e); return(Success(false)); } }