Error Intentun Savechanges () Entity Framework 6 ASP.Net MVC5?

0

When I update my gender object, it brings the date of creation with the following data, which should not because it has a value assigned in the database, I get the following date:

The error that shows me when I try to do the savechanges() is the following

  

The conversion of a datetime2 data type to a datetime data type   resulted in an out-of-range value.

    
asked by Ing. Jose Valera 31.12.2018 в 14:57
source

1 answer

1

I think this approach could work, if the CreationDate column in your DB is of type DATETIME.

public DateTime CreationDate { get; set; } = new DateTime(1753, 1, 1);

Microsoft docs

    
answered by 01.01.2019 в 19:38