Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Db Default Value" property for entity fields #15

Closed
buchatsky opened this issue Apr 4, 2022 · 0 comments
Closed

"Db Default Value" property for entity fields #15

buchatsky opened this issue Apr 4, 2022 · 0 comments
Labels
enhancement-M New feature request. Tshirt size: M released Issue is resolved in a current release
Milestone

Comments

@buchatsky
Copy link

buchatsky commented Apr 4, 2022

Proposed behaiour
"Db Default Value" (or whatever) property in "Database" category for entity fields which would generate .HasDefaultValueSql(string) clause in DbContext.OnModelCreating() method. E.g. "(getdate())", "(newid())" or user-defined functions.
User scenarios:

  • SQL scripts to update DB besides EF Migrations;
  • importing data directly to DB

Current behaviour
Allows only initial values of the same type as field type. Doesn't allow string expressions.

Versions
EF Visual Editor: 4.1.2.0
Visual Studio 2022: 17.1.3

@msawczyn msawczyn added investigating Looking into this enhancement-M New feature request. Tshirt size: M and removed investigating Looking into this labels Apr 5, 2022
@msawczyn msawczyn added the pending release Issue is resolved in the current codebase, will be published with the next release label Jun 27, 2022
@msawczyn msawczyn added this to the 4.2 milestone Jun 27, 2022
@msawczyn msawczyn added released Issue is resolved in a current release and removed pending release Issue is resolved in the current codebase, will be published with the next release labels Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement-M New feature request. Tshirt size: M released Issue is resolved in a current release
Projects
None yet
Development

No branches or pull requests

2 participants