Change syncEntity and syncAll to return result