Logging a message to a file for debugging purposes using C#.

There are any number of times where I find myself puzzled over a problem that exists on a remote server and cannot be reproduced on my local development box. There are different ways to solve this, but sometimes it’s just helpful to have a way to log messages to a file. This last incident involved …

Continue reading ‘Logging a message to a file for debugging purposes using C#.’ »

Unable to update the EntitySet ” because it has a DefiningQuery and no <> element exists in the <> element to support the current operation.

Silly thing this. Found this link. In my case this was caused by not selecting the primary key for the table in SQL Server I was generating the entity set against and then attempting to call the Entity Framework AddObject method with the generated entity. I’m pretty sure that this sort of error will occur …

Continue reading ‘Unable to update the EntitySet ” because it has a DefiningQuery and no <> element exists in the <> element to support the current operation.’ »