public IActionResult ThemDiaDiem(DiaDiems diaDiems) { if (ModelState.IsValid) { diaDiemRepo.Add(diaDiems); return(RedirectToAction("Index")); } return(View()); }
public bool Update(DiaDiems d) { _context.Update(d); return(_context.SaveChanges() != 0); }
public bool Add(DiaDiems d) { _context.Add(d); return(_context.SaveChanges() != 0); }
public IActionResult Edit(DiaDiems diaDiems) { diaDiemRepo.Update(diaDiems); return(RedirectToAction("index")); }