Ejemplo n.º 1
0
 private void InterceptSetter(IInvocation invocation, CodeFirstLazyInitialiser codeFirstLazyInitialiser)
 {
     if (!codeFirstLazyInitialiser.IsDone)
     {
         codeFirstLazyInitialiser.Complete();
     }
 }
Ejemplo n.º 2
0
 private void InterceptGetter(IInvocation invocation, CodeFirstLazyInitialiser codeFirstLazyInitialiser)
 {
     if (!codeFirstLazyInitialiser.IsDone)
     {
         CodeFirstModelContext.ReinstateContext(invocation.InvocationTarget);
         codeFirstLazyInitialiser.Execute();
         CodeFirstModelContext.ResetContext();
     }
 }