EF database first, rename entity table name

后端 未结 1 514
[愿得一人]
[愿得一人] 2020-12-17 01:42

I have project with approach database first. Tables this database have names kind GUID. I want use human names in code. How i can change name entity, but no change table n

相关标签:
1条回答
  • 2020-12-17 02:08

    You can do that using EF Model Browser:

    • Open Entity Model Browser
    • Navigate to your entity under YourModel/Entity Types
    • right click + Properties
    • You can chance entity type name here

    Or using designer:

    • right click on your entity on the design pane + Properties from context menu
    • Change Name property value

    It will change generated entity class name without changing the database table nama.

    0 讨论(0)
提交回复
热议问题