Closed booyaa closed 12 years ago
Thanks for reporting. Is there anyway you could write a test that would illustrate this issue? The method at the top of the stacktrace is called constantly (and as such, all the tests call this method and none of them are failing), so the scenario you are in is going to be hard for me to reporoduce.
hiya, will upload test code on friday
hiya, got test code written (zipped up solution file), is there a place on github I can upload to?
Craig,
I think I'm being dim, didn't realise that the nullreference exceptions are caused when checking for any properties that don't exist w.r.t ExpandoObjects. I suspect this also applies when db.find returns no records.
I'm happy to close this issue if you are.
IF you are comfortable that this is a you thing and not a me thing, then by all means, close it up.
I've got a webpage that flicks between prev and next days, during the Page_Load event I try to check if there's any data for the current date. Here's my code:
Here's the stack trace from the exception:
incidentally line 40 is this bit of code in the Try/Catch: foodDiary = db.Diary.FindByDate(DiaryDate.ToShortDateString());
I'd prefer just checking if the object is null, if it's possible.
Thanks!