I'm trying to do a simple UPDATE ... WHERE ISNULL() using SubSonic ActiveRecord and the only way I can get it to work is by using CodingHorror. eg:
public void MarkMessagesRead(long? from_person)
{
if (from_person.HasValue)
{
_db.Update<message>()
.Set(x => x.is_read == true)
.Where(x => x.from_id == from_person && x.to_id == people_id)
.Execute();
}
else
{
new SubSonic.Query.CodingHorror(_db.DataProvider, "UPDATE messages SET is_read=1 WHERE ISNULL(from_id) AND to_id=@toid", people_id).Execute();
}
}
Am I missing something?