protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["report"] != null)
     {
         var loadTestDbId = Request.QueryString["report"];
         var reader = new ReportReader();
         var report = reader.Get(loadTestDbId);
         reportModel = JsonConvert.SerializeObject(report);
     }
 }
        public void Write(Report report)
        {
            var server = ServerFactory.Create();
            var db = server.GetDatabase("LoadTestReports");
            if(!db.CollectionExists("Reports")) db.CreateCollection("Reports");
            var reports = db.GetCollection<Report>("Reports");

            var reader = new ReportReader();
            var existingReport = reader.Get(report.LoadTestDBId);
            if (existingReport != null) report.Id = existingReport.Id;

            reports.Save(report);
        }