Exemplo n.º 1
0
        public async Task <long> Get(int id)
        {
            ICounter counter =
                ServiceProxy.Create <ICounter>(new Uri("fabric:/Demo/BookDataService"), new ServicePartitionKey(0));

            return(await counter.GetCounterAsync());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Index()
        {
            ICounter objCounter = ServiceProxy.Create <ICounter>(new
                                                                 Uri("fabric:/ASF_Stateless/SatefulSrvc"), new ServicePartitionKey(0));

            ViewBag.count = await objCounter.GetCounterAsync();

            return(View());
        }