DatabaseBuilder orders the table columns by name with pk columns first a...

...nd fk columns last.
You are right, the user can reorder the columns in the scaffolded code. 
I will remove the OrderBy call for primary key and foreign key columns. That will give us primary key columns first, in the order declared, followed by other columns ordered by name using InvariantCulture, case sensitive, followed by foreign key columns in the order they were declared (excluding duplicates).