ICounterApiNext Method |
Namespace: Casewhere.Runtime.DSL.Api
int Next( string name )
var counterApi = ctx.Use<ICounterApi>(); // This example generates a new Order Number for the current year var orderNo1 = counterApi.Next($"OrderNo_{DateTime.Now.Year}"); // return 1 var orderNo2 = counterApi.Next($"OrderNo_{DateTime.Now.Year}"); // return 2 var receiptNo = counterApi.Next($"ReceiptNo_{DateTime.Now.Year}"); // return 1