Created
August 29, 2012 17:39
-
-
Save yreynhout/3516020 to your computer and use it in GitHub Desktop.
Sample 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PushBasedProjectionSqlOperations<TProjection> : | |
IProjectionSqlOperations<TProjection> { | |
IObserver<ISqlStatement> _observer; | |
ISqlStatementFactory _factory; | |
public PushBasedProjectionSqlOperations( | |
IObserver<ISqlStatement> observer, | |
ISqlStatementFactory factory) { | |
_observer = observer; | |
_factory = factory; | |
} | |
public void Insert(TProjection item) { | |
_observer.OnNext( | |
_factory.NewInsertStatement<TProjection>(item)); | |
} | |
public void Delete(Expression<Func<TProjection, bool>> @where) { | |
_observer.OnNext( | |
_factory.NewDeleteStatementWhere<TProjection>(@where)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment