How to change field value when i retrieve it using linq?

Posts   
 
    
Posts: 15
Joined: 16-May-2012
# Posted on: 24-Oct-2012 15:37:15   

Hello,

i extended CommonEntityBase with

protected override void OnGetValue(int fieldIndex, out bool cancel) { cancel = false; var fieldType = Fields[fieldIndex].ActualDotNetType; if (fieldType == typeof(DateTime) || fieldType == typeof(DateTime?)) { if (Fields[fieldIndex].CurrentValue != null) { DateTime? date = (DateTime)Fields[fieldIndex].CurrentValue; Fields[fieldIndex].CurrentValue = date.UtcToLocal(); } }

        base.OnGetValue(fieldIndex, out cancel);
    }

and it works with single entity.

i'm using llblgen 3.1

but how to override certain type field value when i create query using linq meta data code what is generated by llblgen?

thanks a lot guys for any help. llblgen is doing phenomenal job here.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 27-Oct-2012 07:40:32   

visuallemon wrote:

but how to override certain type field value when i create query using linq meta data code what is generated by llblgen?

How does look your linq query? Is it a anonymous-type query or a entity query?

David Elizondo | LLBLGen Support Team