public ActionResult Create(lecturers lecturers) { if (ModelState.IsValid) { lecturers.CreatedDate = DateTime.UtcNow; lecturers.Password = EncryptedString.EncryptString(lecturers.Password, key); db.lecturers.AddObject(lecturers); db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.DepartmentID = new SelectList(db.departments, "DepartmentID", "Name", lecturers.DepartmentID); return View(lecturers); }
public void Delete(lecturers entity) { Repository.Delete(entity); }
public void Add(lecturers entity) { Repository.Add(entity); }
/// <summary> /// Deprecated Method for adding a new object to the lecturers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTolecturers(lecturers lecturers) { base.AddObject("lecturers", lecturers); }
/// <summary> /// Create a new lecturers object. /// </summary> /// <param name="lecturerID">Initial value of the LecturerID property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="surName">Initial value of the SurName property.</param> /// <param name="userName">Initial value of the UserName property.</param> /// <param name="password">Initial value of the Password property.</param> public static lecturers Createlecturers(global::System.Int32 lecturerID, global::System.String name, global::System.String surName, global::System.String userName, global::System.String password) { lecturers lecturers = new lecturers(); lecturers.LecturerID = lecturerID; lecturers.Name = name; lecturers.SurName = surName; lecturers.UserName = userName; lecturers.Password = password; return lecturers; }