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