Comments (5)
Hi @greghroberts. DateTime is a value type in .net. The default value is going to be default(DateTime) if you did not specify a default value, is '0001-01-01 00:00:00'.
You can also define a default value in your model:
public DateTime Created { get; set; } = DateTime.Now;
from pomelo.entityframeworkcore.mysql.
I understand it's a value type. My question is more on if you plan on making DefaultValues work as per the EF docs. The attached example and link do not work as designed.
from pomelo.entityframeworkcore.mysql.
@greghroberts Confirmed a bug, thanks for reporting this issue, we will fix it in some hours.
from pomelo.entityframeworkcore.mysql.
@greghroberts Thanks again. We have fixed this bug, and we will release this new version later.
from pomelo.entityframeworkcore.mysql.
Awesome thanks!
from pomelo.entityframeworkcore.mysql.
Related Issues (20)
- Re-Opening connection hangs after successful query within scope of Http Request HOT 4
- Database generated value for DateTime givs an error after updating to version 8.0.1 HOT 5
- `Math.Log` number and base are in the wrong order in mysql `LOG` function HOT 1
- SEVERE ASP Api Response Time Problems with 8.0.1 and beyond HOT 10
- why string contains can be translated to like '' HOT 2
- Replace JSON_EXTRACT utilisation with JSON_VALUE HOT 5
- All primary keys altered in migration after upgrading efcore to 8.0.1 HOT 3
- Getting different SQL output for the same LINQ Query since upgrading to .NET 8 HOT 2
- ArgumentException: Option 'name' not supported. HOT 11
- Input string was not in a correct format when compare with TimeSpan HOT 1
- After upgrading from 7.0.0 to 8.0.2, SQL translation results are changed and this version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'. HOT 2
- MySQL operations break after InvalidOperationException: Can't Replace Active Reader HOT 2
- Remove explicit reference to `System.Text.Json` package from `Pomelo.EntityFrameworkCore.MySql.Json.Microsoft` package HOT 4
- After upgrading to 8.0.2 .SetAfterSaveBehavior(PropertySaveBehavior.Ignore) generates SQL that updates the column value HOT 7
- Invalid SQL Syntax when adding an entity with a default expression HOT 3
- TimeSpan.TotalHours could not be translated HOT 7
- Error assigning index for [table] HOT 1
- Error adding integer auto-increment column with migration (since 8.0.1)
- System.TypeLoadException: Method 'Quote' in type does not have an implementation. HOT 1
- MariaDB Maxscale Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pomelo.entityframeworkcore.mysql.