public EmployeeProp Update(EmployeeProp EmployeeChanges) { var employ = context.EmployeeProps.Attach(EmployeeChanges); employ.State = Microsoft.EntityFrameworkCore.EntityState.Modified; context.SaveChanges(); return(EmployeeChanges); }
public EmployeeProp Delete(int id) { EmployeeProp employeeProp = context.EmployeeProps.Find(id); if (employeeProp != null) { context.EmployeeProps.Remove(employeeProp); context.SaveChanges(); } return(employeeProp); }
public EmployeeProp Add(EmployeeProp employee) { context.EmployeeProps.Add(employee); context.SaveChanges(); return(employee); }