Using sql server profiler I can see that the initial query for AnswerComment is going to the db but when I get to the ef.SaveChanges() nothing is getting to the db. I'm using sqlexpress 2008 R2.
using (TPRDEntities ef = new TPRDEntities())
{
var ac = ef.AnswerComments.Where(a => a.AnswerCommentID == answercomment.AnswerCommentID).FirstOrDefault();
if (ac == null)
{
ac = new AnswerComment();
ac.AnswerID = answercomment.AnswerID;
ac.DisplayText = answercomment.DisplayText;
ac.InsertDate = answercomment.InsertDate;
ac.InsertUser = "save test user";
ef.SaveChanges();
}
}