コード例 #1
0
        public ActionResult Create(TestSuiteVM testSuiteVM)
        {
            var testsuite = Mapper.Map<TestSuiteVM, TestSuite>(testSuiteVM);
            db.TestSuites.Add(testsuite);
            db.SaveChanges();

            return RedirectToAction("Index", "TestCasesPerTestSuite", new { id = testsuite.TeamID });
        }
コード例 #2
0
        public ActionResult Edit(TestSuiteVM testSuiteVM)
        {
            TestSuite testsuite = db.TestSuites.Find(testSuiteVM.TeamID);
            if (testsuite == null) return HttpNotFound();
            db.Entry(testsuite).CurrentValues.SetValues(testSuiteVM);
            db.SaveChanges();

            return RedirectToAction("Index", "TestCasesPerTestSuite", new { id = testsuite.TeamID });
        }
コード例 #3
0
        public ActionResult Create()
        {
            TestSuiteVM testSuiteVM = new TestSuiteVM
            {
                Teams = new SelectList(GetTeamsWithNoTestsuite(), "TeamID", "Name")
            };

            return View("Create", testSuiteVM);
        }