I'm trying to assess the whole OutOfSync situation to find the "best practice" for one our projects, which uses the Adapter model.
This is based upon http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=5676 and http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=781 and http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=4361 and...
I understand that once an entity has been saved and not refetched it is OutOfSync because some triggers and/or constraints might have changed the corresponding row in the database. That makes perfect sense to me.
Yet in some cases we know for sure that nothing can change the row in the database, and we want to avoid to refetch for performance reasons, and yes, we are willing to take the risk.
In those cases, we want to tell LLBLGen that the entity is not, actually, out of sync (compare this with http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=781 where Marcus just wanted to ignore that the entity was out of sync).
So, what is the appropriate way to do this?
Is setting entity.Fields.State = EntityState.Fetched enough (as Frans implies in http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=4361) or (as http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=5676 seems to imply) do we need to perform more operations? In that case, what would these operations be?
What is the best place to do it? adapter.OnSaveEntityComplete seems to come in too early. Overriding adapter.Save will do for one entity but not for collections or graphs. What else?
Thanks!