Exemple #1
0
 public static void Modify(Employee employee, string firstName)
 {
     var id = employee.EmployeeID;
     var databaseEmployee = context.Employees.Find(id);
     databaseEmployee.FirstName = firstName;
     context.SaveChanges();
 }
Exemple #2
0
 public static void Delete(Employee employee)
 {
     context.Employees.Remove(employee);
     context.SaveChanges();
 }
Exemple #3
0
 public static void Add(Employee employee)
 {
     context.Employees.Add(employee);
     context.SaveChanges();
 }