public async Task <ActionResult> Edit(MatcherViewModel model, string updateButton)
        {
            string previousPage = CacheHelper.GetPreviousPage(_cache);

            if (updateButton.Equals("Cancel"))
            {
                return(Redirect(previousPage));
            }

            // we load the matcher in cache to restore the conditions previously defined
            var matcher = await DigitalTwinsHelper.GetMatcherAsync(model.SelectedMatcher.Id, _cache, Loggers.SilentLogger, false);

            matcher.Name = model.SelectedMatcher.Name;

            // we update the matcher
            await DigitalTwinsHelper.UpdateMatcherAsync(matcher, _cache, Loggers.SilentLogger);

            // we associate the matcher with the UDF
            //var udf = await DigitalTwinsHelper.GetUserDefinedFunction(model.UdfId, _cache, Loggers.SilentLogger, false);
            //udf.Matchers.Add(matcher);
            //await DigitalTwinsHelper.UpdateUserDefinedFunctionAsync(_cache, Loggers.SilentLogger, udf);

            //we remove the matcher from the cache
            CacheHelper.AddInCache(_cache, null, Guid.Empty, Context.Matcher);

            return(RedirectToAction("Edit", "UDF", new { id = model.UdfId }));
        }