public static void MapCommands(
     this IEndpointRouteBuilder app,
     IMessageMappingBuilder pattern,
     IEnumerable <Type> commandTypes)
 {
     foreach (Type commandType in commandTypes)
     {
         app.MapMessage(pattern, commandType);
     }
 }
 public static void MapQueries(
     this IEndpointRouteBuilder app,
     IMessageMappingBuilder pattern,
     IEnumerable <(Type QueryType, Type ResultType)> queryTypes)