1

Adding new entity to database via web api OData service keeps giving me the following error. "Cannot convert a primitive value to the expected type 'Edm.DateTime'. See the inner exception for more details." I googled a bit and found out that it's related to OData not supporting DateTime type. I am using EF with database first approach and some of the entities have properties which are of DateTime Type.

Any suggestion for the issue?

Thanks. Nyi

Nyi Nyi
  • 678
  • 5
  • 13
  • 2
    You can refer to: [How to get Web API OData v4 to use DateTime](http://stackoverflow.com/questions/25189557/how-to-get-web-api-odata-v4-to-use-datetime/25227159#25227159) – Sam Xu Sep 28 '14 at 01:34
  • Thanks Sam Xu. It Wroks. – Nyi Nyi Sep 30 '14 at 05:28

0 Answers0