Esempio n. 1
0
        public ActionResult Index()
        {
            Stopwatch watch = new Stopwatch();

            watch.Start();
            ContentManagement service = new ContentManagement();
            var content = service.GetContent();
            var count   = service.GetCount();
            var name    = service.GetName();

            watch.Stop();
            ViewBag.WatchMilliseconds = watch.ElapsedMilliseconds;
            return(StatusCode(200, new { TimeElapsed = $"{watch.ElapsedMilliseconds}" }));
        }