Home > database >  Scaffold-DbContext is not generating column as same in Table
Scaffold-DbContext is not generating column as same in Table

Time:02-04

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

CodePudding user response:

  • -UseDatabasenames option works.
  •  Tags:  
  • Related