public ActionResult Index(HomeIndexModel model)
        {
            if (IsConnectionStringInWebConfig(model.SelectedLogDatabase))
            {
                SetConnectionStringCookie(model.SelectedLogDatabase);
                return RedirectToAction("Index");
            }

            return View(model);
        }
        public ActionResult Index()
        {
            var model = new HomeIndexModel();
            var profiler = MiniProfiler.Current;

            using (profiler.Step("Getting logs from database"))
            using (var sqlConn = CreateProfiledDbConnection())
            {
                model.Logs.AddRange(sqlConn.Query<Log>("SELECT TOP 100 * FROM Log ORDER BY Id DESC"));
            }

            model.SelectedLogDatabase = GetSelectedConnectionStringName();
            model.LogDatabases.AddRange(LogDatabaseConnectionStrings.Select(css => new SelectListItem { Text = css.Name.Replace(LogDatabase.ConnectionStringPrefix, string.Empty), Value = css.Name }));

            return View(model);
        }