[SOLVED] Scaffold-DbContext is not generating column as same in Table

Issue

I used Scaffold-DbContext to generate entity class. Its generating class but removed underscore from properties ( table’s column), also followed the camel case.

Example.

column name RT_UNIQUE changed to RtUnique

column name D_DISTRICT changed to DDistrict

I know the naming convention are not correct. But these are oracle tables and can’t be modified for now.

Is there any flag/option need to set Scaffold-DbContext command to keep the same column name as in table.

Thanks

Solution

  • -UseDatabasenames option works.

Answered By – vickyP

Answer Checked By – Cary Denson (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *