public IActionResult List() { CheckDataSourceParameter(); var ctx = new RequestContext(SqlScope, SqlId) .SetExtraParam(AppCtx.AC.Params); var res = AppCtx.Session.Query(ctx); // set online state from cache. foreach (var item in res) { item.value = iotService.GetData((string)item.mac, true); } return Json(res); }
public async Task Join(string group) { await Groups.AddToGroupAsync(Context.ConnectionId, group); var clientProxy = Clients.Group(group); await clientProxy.SendAsync("Send", iotService.GetData(group)); }