From 3be5ca952505cfc4bec05942fd737879fff6dde9 Mon Sep 17 00:00:00 2001 From: Kevin Jump Date: Wed, 10 Jul 2019 10:12:44 +0100 Subject: [PATCH] #223 - Macro GetAll (Can't use GetAll EntiyService for macros) --- Jumoo.uSync.Core/Serializers/MacroSerializer.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Jumoo.uSync.Core/Serializers/MacroSerializer.cs b/Jumoo.uSync.Core/Serializers/MacroSerializer.cs index 46169472..5a36f0a2 100644 --- a/Jumoo.uSync.Core/Serializers/MacroSerializer.cs +++ b/Jumoo.uSync.Core/Serializers/MacroSerializer.cs @@ -51,11 +51,9 @@ internal override SyncAttempt DeserializeCore(XElement node) var key = node.Element("Key").ValueOrDefault(Guid.Empty); if (key != Guid.Empty) { - var entities = _entityService.GetAll(key); - if (entities != null && entities.Any() && entities.FirstOrDefault() != null) - { - item = _macroService.GetById(entities.FirstOrDefault().Id); - } + var macros = _macroService.GetAll(key); + if (macros != null && macros.Any()) + item = macros.FirstOrDefault(); } }