If you look closely, the error itself tells you what is wrong.
The parameter you're passing to the method Convert.ToInt32 is of the type.
Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[System.Int32]
Try calling
FirstOrDefault()
after the
.Select(i => i.EmployeeId)
statement to get the good type in nextID.
And if it is already an integer, avoid the conversion.