Example #1
0
        public ActionResult RunHelloService()
        {
            using (var helloService = HostContext.ResolveService <HelloService>(base.HttpContext))
            {
                var response = (HelloResponse)helloService.Any(new HelloRequest {
                    Name = User.Identity.Name
                });

                ViewBag.Response = response.Result;
                ViewBag.Counter  = ServiceStackSession.Get <int>(HelloService.HelloServiceCounterKey);
                return(View("Index"));
            }
        }
Example #2
0
        public ActionResult RunHelloService()
        {
            var helloService = AppHostBase.Resolve <HelloService>();

            helloService.RequestContext = System.Web.HttpContext.Current.ToRequestContext();
            var response = (HelloResponse)helloService.Any(new HelloRequest {
                Name = User.Identity.Name
            });

            ViewBag.Response = response.Result;
            ViewBag.Counter  = ServiceStackSession.Get <int>(HelloService.HelloServiceCounterKey);
            return(View("Index"));
        }