public void AddLop(Lop lop) { db.Lops.Add(lop); }
public ActionResult ThemLop(Lop themlop) { if (ModelState.IsValid) { repository.AddLop(themlop); repository.Save(); ViewBag.Mess = "Đã thêm thành công"; return View(); } ViewBag.Mess = "Dữ liệu nhập không chính xác, vui lòng nhập lại"; return View(); }