Beispiel #1
0
        }//method

        public void EnsureLoaded(EntityMemberInfo member)
        {
            switch (member.Kind)
            {
            case EntityMemberKind.Column:
            case EntityMemberKind.Transient:
            case EntityMemberKind.EntityRef:
                member.GetValueRef(this, member);
                break;

            case EntityMemberKind.EntityList:
                // for lists, touch Count property to make sure it is loaded/refreshed
                // If the list had been accessed/loaded before, but then marked as stale then internal list was cleared - let's force reload
                var list  = member.GetValueRef(this, member) as IList;
                var count = list.Count;
                break;
            }//switch
        }
Beispiel #2
0
 public object GetValue(EntityMemberInfo member)
 {
     //If there's session, go thru session. Authorization-enabled session will use this method to check permissions
     if (Session == null)
     {
         return(member.GetValueRef(this, member));
     }
     else
     {
         return(Session.RecordGetMemberValue(this, member));
     }
 }
Beispiel #3
0
 public object GetValue(EntityMemberInfo member)
 {
     return(member.GetValueRef(this, member));
 }
Beispiel #4
0
 public object GetValue(EntityMemberInfo member)
 {
     //If there's session, go thru session. Authorization-enabled session will use this method to check permissions
       if (Session == null)
     return member.GetValueRef(this, member);
       else
     return Session.RecordGetMemberValue(this, member);
 }
Beispiel #5
0
 public void EnsureLoaded(EntityMemberInfo member)
 {
     switch(member.Kind) {
     case MemberKind.Column:
     case MemberKind.Transient:
     case MemberKind.EntityRef:
       member.GetValueRef(this, member);
       break;
     case MemberKind.EntityList:
       // for lists, touch Count property to make sure it is loaded/refreshed
       // If the list had been accessed/loaded before, but then marked as stale then internal list was cleared - let's force reload
       var list = member.GetValueRef(this, member) as IList;
       var count = list.Count;
       break;
       }//switch
 }
Beispiel #6
0
 // Will be overridden SecureSession
 public virtual object RecordGetMemberValue(EntityRecord record, EntityMemberInfo member)
 {
     return(member.GetValueRef(record, member));
 }