public string Execute(IQueryResultset queryResultset) { var salutation = queryResultset.GetQueryResult <GetSalutationQuery, string>(); var fullName = queryResultset.GetQueryResult <GetFullNameQuery, string>(); return($"{salutation} {fullName}"); }
private static void RunAllKnownQueries(IQueryRuntime queryRuntime, Person person) { Console.WriteLine("\nRunning all known queries...."); IQueryResultset queryResultset = queryRuntime.RunAllQueries(person); string salutation = queryResultset.GetQueryResult <GetSalutationQuery, string>(); Console.WriteLine($"Salutation : {salutation}"); string fullName = queryResultset.GetQueryResult <GetFullNameQuery, string>(); Console.WriteLine($"Full name: {fullName}"); }