Esempio n. 1
0
        public string GetJSForUser(string userId)
        {
            string webRootPath = hostingEnvironment.WebRootPath;

            string result  = System.IO.File.ReadAllText(webRootPath + "/JavaScript.js");
            var    abtests = abTestsRepository.GetByUserId(userId).ToList();

            result = result.Replace("@abTests", JsonConvert.SerializeObject(abtests));
            return(result);
        }
Esempio n. 2
0
 public IEnumerable <ABTest> GetABTests()
 {
     return(abTestsRepository.GetByUserId(HttpContext.Session.GetString("UserId")));
 }