public void Add(Employee employee) { employeeList.Add(employee); }
public void Delete(Employee employee) { employeeList.Remove(employee); }
/// <summary> /// Create a new Employee object. /// </summary> /// <param name="fname">Initial value of the Fname property.</param> /// <param name="lname">Initial value of the Lname property.</param> /// <param name="ssn">Initial value of the Ssn property.</param> /// <param name="dno">Initial value of the Dno property.</param> public static Employee CreateEmployee(global::System.String fname, global::System.String lname, global::System.String ssn, global::System.Int32 dno) { Employee employee = new Employee(); employee.Fname = fname; employee.Lname = lname; employee.Ssn = ssn; employee.Dno = dno; return employee; }
/// <summary> /// Deprecated Method for adding a new object to the Employees EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToEmployees(Employee employee) { base.AddObject("Employees", employee); }
public void Delete(Employee employee) { employeeEntities.DeleteObject(employee); }
public void Add(Employee employee) { employeeEntities.AddObject("Employees", employee); }
public ActionResult DeleteEmployee(string essn) { var employee = new Employee {Ssn = essn}; _repository.Delete(employee); return RedirectToAction("Index"); }