What is the difference between IRepository.Add and IRepository.Update in SubSonic3 SimpleRepository?
views:
93answers:
2
+2
A:
Add should perform a sql Insert whereas Update should perform a sql Update. So Add is for new objects i.e. without a primary key value assigned.
Adam
2009-08-25 08:18:11
Okay, yes, it seems that Add will just ignore the value of the primary key field in the object that is passed to it.
dangph
2009-08-25 10:03:58
And Update silently ignores any object that is passed to it if that object isn't already in the table (based on its primary key). (I am testing with Sqlite3 BTW.)
dangph
2009-08-25 10:19:45