public ActionResult DeleteConfirmed(int id) { testClass1 testClass1 = db.testClass1s.Find(id); db.testClass1s.Remove(testClass1); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "pid,PatientId,pname,Appointment")] testClass1 testClass1) { if (ModelState.IsValid) { db.Entry(testClass1).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(testClass1)); }
public ActionResult Create([Bind(Include = "pid,PatientId,pname,Appointment")] testClass1 testClass1) { if (ModelState.IsValid) { db.testClass1s.Add(testClass1); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(testClass1)); }
// GET: testClass1/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } testClass1 testClass1 = db.testClass1s.Find(id); if (testClass1 == null) { return(HttpNotFound()); } return(View(testClass1)); }
public void BasicTest() { var result = new testClass1(); Assert.DoesNotThrow(() => result = faker.Create <testClass1>()); Assert.True(result != null, "Faker created null object."); Assert.True(result.firstList != null, "Failed to initialize firstList"); Assert.True(result.unsupportedList != null, "Failed to initialize unsupportedList"); Assert.True(result.firstList.Count == 1, "Failed to add value to firstList"); }