コード例 #1
0
ファイル: SurveyTests.cs プロジェクト: codeulike/SurveyOrDie
        public void CanPopulate()
        {
            var surv = new Survey();

            surv.FormHash = "something/something";
            surv.SubDomain = "something";
        }
コード例 #2
0
        public ActionResult Create(Survey survey)
        {
            if (ModelState.IsValid)
            {
                m_db.Surveys.Add(survey);
                m_db.SaveChanges();

                return RedirectToAction("Prepare", new { id = survey.SurveyID });
            }

            return View(survey);
        }
コード例 #3
0
 public ActionResult Edit(Survey survey)
 {
     if (ModelState.IsValid)
     {
         m_db.Entry(survey).State = EntityState.Modified;
         m_db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(survey);
 }
コード例 #4
0
 public void MarkModified(Survey s)
 {
     this.Entry(s).State = EntityState.Modified;
 }
コード例 #5
0
 public DbEntityEntry<Survey> Entry(Survey s)
 {
     return base.Entry<Survey>(s);
 }
コード例 #6
0
 public void MarkModified(Survey s)
 {
 }
コード例 #7
0
 public DbEntityEntry<Survey> Entry(Survey s)
 {
     return null;
 }