Пример #1
0
 public static void Delete(Employee employee)
 {
     context.Employees.Remove(employee);
     context.SaveChanges();
 }
Пример #2
0
 public static void Modify(Employee employee)
 {
     var empToEdit = context.Employees.Where(e => e.EmployeeID == employee.EmployeeID).First();
     empToEdit = employee;
     context.SaveChanges();
 }
Пример #3
0
 public static void Add(Employee employee)
 {
     context.Employees.Add(employee);
     context.SaveChanges();
 }