Change Tracking

Coordinator
Mar 9, 2011 at 5:01 AM

So I want to tackle making changes to a directory.  Here's what I'm thinking:

  • Adding Collection<T>, ICollection<T>, and IEnumerable<T> mapping support in addition to my support for byte[] and string[].  This is a must if I want to support change tracking on collections.  I plan to use ObservableCollection<T> for this implementation.
  • Adding a super class that all entries have to sub class if you want them enabled for change tracking.  You would be able to submit new entries, but not update without this class.
  • Adding additional property mappings for specifying unique key and store generated.
  • Adding an Add method and SubmitChanges method to the DirectoryContext.

Alternatives to the first two points would be to use something like Castle Dynamic Proxy or LinFu.  I'm curious if anyone has any thoughts on these points?

Coordinator
Mar 10, 2011 at 12:43 AM

I forgot about Delete.  Also, I think I want to make changes explicit.  SubmitChanges implies that transactional work is being done.  LDAP has zero support for transactions so I don't want to be misleading with the API.  I can still support change tracking, but you will have to explicitly call Update, Save, or Delete and changes will be immediate.