question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default value when adding.

See original GitHub issue

Cool idea is you can insert default values that are in the model. So if we have:

public string DateFormat { get; set; } = "DD-MM-YYYY";

We will get this result: image

_Originally posted by @Alerinos in https://github.com/KorzhCom/EasyData/issues/91#issuecomment-1013797263_

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
antifreecommented, Jan 18, 2022

Yes, regarding DateOnly and TimeOnly types, ef core SQL server provider has not implemented support yet. So you can use the other approach, or wait for version 1.4.2 where you will be able to configure type via annotations or fluent API (#101)

About input, it has been added for some types. Possibly number input type is missing

1reaction
antifreecommented, Jan 18, 2022

OK. I’ve figure out how to implement this possibility too fef91db052b039e7b057817f2c7fded5d16e50eb

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a column with a default value to an existing table in ...
Syntax: ALTER TABLE {TABLENAME} ADD {COLUMNNAME} {TYPE} {NULL|NOT NULL} CONSTRAINT {CONSTRAINT_NAME} DEFAULT {DEFAULT_VALUE} WITH VALUES ...
Read more >
SQL DEFAULT Constraint
The DEFAULT constraint is used to set a default value for a column. The default value will be added to all new records,...
Read more >
How to add a column with a default value to an existing table
Overview. To add a new column to an existing table, we use the ALTER TABLE command to add a new column to an...
Read more >
How to Add a Column with Default Value to an Existing ...
To add a column with a default value, we can use the alter table query as shown below: alter table sample_table add with_default_col...
Read more >
MS SQL Server - How to insert a column with default value ...
From data table view, switch to database structure view using the Structure button at the window bottom, or use shortcut keys Cmd +...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found