Click here to Skip to main content
15,443,281 members

Comments by Ger Hayden (Top 124 by date)

Ger Hayden 4-May-22 16:42pm View    
Now there's a thought. I will explore that in the morning.
Ger Hayden 4-May-22 9:53am View    
This solution does not explain how a date value of now i.e. some time in the 21st century is not mapped properly resulting in the SaveChanges() substituting a value of '0001-01-01' during the generation of the SQL.
Ger Hayden 4-May-22 7:51am View    
Hi Richard, I've updated the question to describe what is happening in the debugger. I dont see a means to upload a screen shot to back it up. Right up to the point where the context executes SaveChanges, today's date is present, but sql profiler is illustrating that this value is not used.
Ger Hayden 22-Mar-22 12:06pm View    
Still relevant, 10 years on.
Ger Hayden 20-Jan-22 5:34am View    
Apologies Richard, the day job is interfering! Both texts were identical to start with. SO nuked it in minutes which is why it is now so different. I did add a brief summary as a solution here - I have since put a note at the top of the original question here and posted the revised code in solution 1. There is still a problem, just not the one I sought help for. I would like to leave it as is here, because I am confident that others will fall into the same trap.