ICounterApiSet Method |
Namespace: Casewhere.Runtime.DSL.Api
void Set( string name, int value )
var counterApi = ctx.Use<ICounterApi>(); // This example generates a new Order Number for the current year counterApi.Next($"OrderNo"); // return 1 counterApi.Next($"OrderNo"); // return 2 counterApi.Set($"OrderNo", 1000); // set the counter value to 1000 counterApi.Next($"OrderNo"); // return 1001