MVC save data appears: An error occurred while updating the entries. See the inner exception for details.

Source: Internet
Author: User

View Details: datetime2 cannot insert datetime (approximate meaning)

As a result, look under, my class does not have a datetime2, breakpoint down, found that the modification time is empty, the result compilation run is automatically assigned to the default value of 0000-00-00 00:00:00,

Database fields are also datetime,

So, the field type that is directly inside the class is allowed to be empty, for example: public DateTime?  Crearedate{get;set;} Price question mark, allowed to be empty,

In this case, when the data is deposited, the time is empty.

Thank you: http://blog.csdn.net/u010032207/article/details/53214871

Http://blog.sina.com.cn/s/blog_bc5f90cd0102wufh.html

Http://bbs.csdn.net/topics/392055909?page=1

MVC save data appears: An error occurred while updating the entries. See the inner exception for details.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.