public EmployeeModel Add(EmployeeModel employee) { employee.Id = _employeeList.Max(e => e.Id) + 1; _employeeList.Add(employee); return(employee); }
public EmployeeModel Add(EmployeeModel employee) { context.Employees.Add(employee); context.SaveChanges(); return(employee); }