mardi 22 septembre 2020

How to get all string values from action arguments in Web API C# method

 public override void OnActionExecuting(HttpActionContext actionContext)
 {

     Dictionary<string, object> list = actionContext.ActionArguments;

     for (int index = 0; index < list.Count; index++)
     {
       // need to all variables if the data type is string only 

       // input parameter might be list or model or int or string

       list.ElementAt(index).Value;

     }
 }




Aucun commentaire:

Enregistrer un commentaire