public override Dictionary <string, object> ToUpdate(IMemoryCache memoryCache, out BaseModel updatedElement)
        {
            Dictionary <string, object> changes = new Dictionary <string, object>();

            Matcher refInCache = null;

            if (Id != Guid.Empty)
            {
                refInCache = CacheHelper.GetMatcherFromCache(memoryCache, Id);

                if (refInCache != null)
                {
                    changes.Add("Name", Name);
                    if (!SpaceId.Equals(refInCache.SpaceId))
                    {
                        changes.Add("SpaceId", SpaceId);
                    }
                    changes.Add("Conditions", Conditions);
                    //if (!Conditions.Equals(refInCache.Conditions)) changes.Add("Conditions", Conditions);
                    if (UserDefinedFunctions != null && UserDefinedFunctions.Equals(refInCache.UserDefinedFunctions))
                    {
                        changes.Add("UserDefinedFunctions", UserDefinedFunctions);
                    }
                }
                else
                {
                    refInCache = this;

                    if (Name != null)
                    {
                        changes.Add("Name", Name);
                    }
                    if (SpaceId != null)
                    {
                        changes.Add("SpaceId", SpaceId);
                    }
                    if (Conditions != null)
                    {
                        changes.Add("Conditions", Conditions);
                    }
                    if (UserDefinedFunctions != null)
                    {
                        changes.Add("UserDefinedFunctions", UserDefinedFunctions);
                    }
                }
            }
            updatedElement = refInCache;
            return(changes);
        }
 public override Dictionary <string, object> ToUpdate(IMemoryCache memoryCache, out BaseModel updatedElement)
 {
     throw new NotImplementedException();
 }