public async Task <IActionResult> Get() { var query = new NavbarQuery() { FiltroBox = "" }; try { return(Ok(handler.Handle(query).Navbar)); } catch { return(BadRequest()); } }
public async Task <IActionResult> Get() { var query = new NavbarQuery() { FiltroBox = "", IdUtente = Request.Headers["idUtente"] }; try { return(Ok(handler.Handle(query).Navbar)); } catch (Exception ex) { return(BadRequest()); } }
public async Task <IActionResult> Get() { var headerValues = Request.Headers["HubConnectionId"]; string ConId = headerValues.FirstOrDefault(); var query = new NavbarQuery() { FiltroBox = "" }; try { Navbar navbar = new Navbar(); navbar = handler.Handle(query).Navbar; await _NotificationHub.Clients.Client(ConId).SendAsync("NotifyGetNavbar", navbar); return(Ok()); } catch { return(BadRequest()); } }