Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SoftDeleteInterceptor : IDbCommandTreeInterceptor
- {
- public void TreeCreated(DbCommandTreeInterceptionContext interceptionContext)
- {
- if (interceptionContext.OriginalResult.DataSpace!= DataSpace.SSpace)
- {
- return;
- }
- var tree = interceptionContext.Result as DbQueryCommandTree;
- if (tree == null)
- {
- return;
- }
- var newQuery = tree.Query.Accept(new SoftDeleteQueryVisitor());
- interceptionContext.Result = new DbQueryCommandTree(
- tree.MetadataWorkspace,
- tree.DataSpace,
- newQuery);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement