Exemple #1
0
        public ActionResult Details(string id)
        {
            Request request = RequestRepository.GetRequest(id);

            if (request == null)
            {
                throw new ApplicationException("Selected request does not exist any more.");
            }

            AnalyticsRepository.RegisterView(Helper.GenerateRequestKey(id),
                                             HttpContext.Request.RawUrl,
                                             HttpContext.Request.UserHostName);

            return(View(request));
        }
        //a little hack, but it does the job of incrementing the number of views even for download only entity sets
        public void IncrementView()
        {
            string baseUri = System.Configuration.ConfigurationManager.AppSettings["serviceUri"];

            AnalyticsRepository.RegisterView(EntitySet.ContainerAlias + "||" + EntitySet.EntitySetName, baseUri, "");
        }