示例#1
0
        public async Task <IActionResult> Get()
        {
            var query = new NavbarQuery()
            {
                FiltroBox = ""
            };

            try
            {
                return(Ok(handler.Handle(query).Navbar));
            }
            catch
            {
                return(BadRequest());
            }
        }
示例#2
0
        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());
            }
        }
示例#3
0
        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());
            }
        }