diff --git a/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs b/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs
index aad6a3912..e1574a65e 100644
--- a/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs
+++ b/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs
@@ -350,6 +350,14 @@ public static void Run()
.WithTransformer()
);
+ // https://stackoverflow.com/questions/51985089/wiremock-request-matching-with-comparison-between-two-query-parameters
+ server
+ .Given(Request.Create().WithPath("/linq")
+ .WithParam("from", new LinqMatcher("DateTime.Parse(it) > \"2018-03-01 00:00:00\"")))
+ .RespondWith(Response.Create()
+ .WithBody("linq match !!!")
+ );
+
System.Console.WriteLine("Press any key to stop the server");
System.Console.ReadKey();
server.Stop();
diff --git a/src/WireMock.Net/Matchers/LinqMatcher.cs b/src/WireMock.Net/Matchers/LinqMatcher.cs
new file mode 100644
index 000000000..b741c5f98
--- /dev/null
+++ b/src/WireMock.Net/Matchers/LinqMatcher.cs
@@ -0,0 +1,99 @@
+using System.Linq;
+using System.Linq.Dynamic.Core;
+using JetBrains.Annotations;
+
+namespace WireMock.Matchers
+{
+ ///
+ /// System.Linq.Dynamic.Core Expression Matcher
+ ///
+ ///
+ public class LinqMatcher : IStringMatcher
+ {
+ private readonly string[] _patterns;
+
+ ///
+ public MatchBehaviour MatchBehaviour { get; }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The pattern.
+ public LinqMatcher([NotNull] string pattern) : this(new[] { pattern })
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The patterns.
+ public LinqMatcher([NotNull] string[] patterns) : this(MatchBehaviour.AcceptOnMatch, patterns)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The match behaviour.
+ /// The pattern.
+ public LinqMatcher(MatchBehaviour matchBehaviour, [NotNull] string pattern) : this(matchBehaviour, new[] { pattern })
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The match behaviour.
+ /// The patterns.
+ public LinqMatcher(MatchBehaviour matchBehaviour, [NotNull] string[] patterns)
+ {
+ MatchBehaviour = matchBehaviour;
+ _patterns = patterns;
+ }
+
+ ///
+ public double IsMatch(string input)
+ {
+ // Convert a single input string to a Queryable string-list with 1 entry.
+ IQueryable queryable = new[] { input }.AsQueryable();
+
+ // Use the Any(...) method to check if the result matches
+ double match = MatchScores.ToScore(_patterns.Select(pattern => queryable.Any(pattern)));
+
+ return MatchBehaviourHelper.Convert(MatchBehaviour, match);
+ }
+
+ /////
+ //public double IsMatch(object input)
+ //{
+ // object value;
+ // switch (input)
+ // {
+ // case JObject valueAsJObject:
+ // value = valueAsJObject.ToObject