hydrologics/Oasis.Base — pull request #16 by johnmetta (2011-10-25 21:41:13+00:00)
Title: Add IStateManager interface to IRepository to quickly assess object state

Add IStateManager interface to IRepository to quickly assess object state in the context

Repositories now have:

Boolean ObjectModified(obj) -> Return true if object has been changed, throw InvalidOperationException if object is not in context yet

System.Data.EntityState GetObjectState(obj) -> Return EntityState, throw InvalidOperationException if object is not in context yet

Boolean ObjectAdded(obj) -> Return true if object is in context, return false if object has not been added to context yet

Tests are in Oasis.Repository.Tests.RepositoryTest and, amazingly, they pass.

Needs: Test with complex objects.