msawczyn/EFDesigner2022

"Db Default Value" property for entity fields

buchatsky opened this issue · 0 comments

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