예제 #1
0
        public ActionResult Create(TaskList tasklist)
        {
            if (ModelState.IsValid)
            {
                tasklist.ID = Guid.NewGuid().ToString();
                _repository.Create(tasklist);
                return RedirectToAction("Index");
            }

            return View(tasklist);
        }
예제 #2
0
 public void Delete(TaskList tasklist)
 {
     _db.TaskLists.Remove(tasklist);
     Validated.SaveIt(_db);
 }
예제 #3
0
 public void Update(TaskList tasklist)
 {
     _db.Entry(tasklist).State = EntityState.Modified;
     Validated.SaveIt(_db);
 }
예제 #4
0
 public void Create(TaskList tasklist)
 {
     _db.TaskLists.Add(tasklist);
     Validated.SaveIt(_db);
 }
예제 #5
0
 public void Update(TaskList tasklist)
 {
     _db.Entry(tasklist).State = EntityState.Modified;
     Validated.SaveIt(_db);
 }
예제 #6
0
 public void Delete(TaskList tasklist)
 {
     _db.TaskLists.Remove(tasklist);
     Validated.SaveIt(_db);
 }
예제 #7
0
 public void Create(TaskList tasklist)
 {
     _db.TaskLists.Add(tasklist);
     Validated.SaveIt(_db);
 }
예제 #8
0
 public ActionResult Edit(TaskList tasklist)
 {
     if (ModelState.IsValid)
     {
         _repository.Update(tasklist);
         return RedirectToAction("Index");
     }
     return View(tasklist);
 }