Click or drag to resize

IDslCompilerContextRouteParameters Property

The route parameters are parsed from the url of the web trigger request
Examples
Assume that a dynamic web trigger has the friendly uri: employee/info/{code}
Then a request for that trigger is: employee/info/DEV-123
var dataApi = ctx.Use<IDataApi>();
var employeeCode = ctx.RouteParameters.Get<string>("code");
var filter = FilterBuilder.Create().Eq("Active", true)
                                      .Eq("Code", employeeCode)
                                      .Build();
var result = dataApi.Search(DataObjectApiQuery
                    .For("Employee")
                    .Paging(0, 1)
                    .FilterBy(filter));
var employee  = result.Data.FirstOrDefault();
ctx.Output = employee;

Namespace:  Casewhere.Runtime.DSL.CompilerContext
Assembly:  Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.1.0
Syntax
C#
DynamicDataObject RouteParameters { get; }

Property Value

Type: DynamicDataObject
See Also