public static System.Collections.Generic.IList <object> ResolveIdListUtility(Net.Vpc.Upa.Callbacks.EntityEvent @event, Net.Vpc.Upa.Expressions.Expression whereExpression) /* throws Net.Vpc.Upa.Exceptions.UPAException */
 {
     Net.Vpc.Upa.Persistence.EntityExecutionContext executionContext = @event.GetContext();
     if (whereExpression is Net.Vpc.Upa.Expressions.IdExpression)
     {
         object id = ((Net.Vpc.Upa.Expressions.IdExpression)whereExpression).GetId();
         return(id == null ? new System.Collections.Generic.List <object>() : new System.Collections.Generic.List <object>(new[] { id }));
     }
     else
     {
         if (!executionContext.IsSet("ALL_IDS"))
         {
             if (@event.GetPhase() == Net.Vpc.Upa.EventPhase.AFTER)
             {
                 throw new Net.Vpc.Upa.Exceptions.UPAException("SingleEntityEventCalledInPostProcessButNeverInPreProcess");
             }
             System.Collections.Generic.IList <object> idList = @event.GetEntity().CreateQueryBuilder().ByExpression(whereExpression).GetIdList <K>();
             executionContext.SetObject("ALL_IDS", idList);
         }
         return((System.Collections.Generic.IList <object>)executionContext.GetObject <T>("ALL_IDS"));
     }
 }