Exemplo n.º 1
0
        public ActionResult Create(Assignment assignment)
        {
            if (ModelState.IsValid)
            {
                ds.Create(assignment);
                return RedirectToAction("Index");
            }

            return View(assignment);
        }
Exemplo n.º 2
0
 // Method for updating assignments
 public void Update(Assignment assignment)
 {
     dc.Entry(assignment).State = EntityState.Modified;
     dc.SaveChanges();
 }
Exemplo n.º 3
0
 // Method for creating assignments
 public void Create(Assignment assignment)
 {
     dc.Assignments.Add(assignment);
     dc.SaveChanges();
 }