protected override void ProcessRecord() { var result = CurrentWebexClient.Instance.Client.Execute(client => { var action = new setUser(); action.webExId = WebExId; action.activeSpecified = true; if (Active.HasValue && Active.Value) { action.active = activeType.ACTIVATED; } else if (Active.HasValue) { action.active = activeType.DEACTIVATED; } if (Email.HasValue()) { action.email = Email; } return(client.setUser(action)); }); if (result.Exception != null) { throw result.Exception; } //response is empty class }
public async Task <IActionResult> Post([FromBody] setUser body) { using (var db = new AppDb()) { await db.Connection.OpenAsync(); body.Db = db; await body.setUserAsync(); return(new OkObjectResult(body.respuesta)); } }