Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> How to add filter for custom property
 

Pages: 1
LLBLGen Pro Runtime Framework
How to add filter for custom property
Page:1/1 

  Print all messages in this thread  
Poster Message
Viresh
User



Location:
Ahmedabad, India
Joined on:
28-Jan-2008 08:52:54
Posted:
31 posts
# Posted on: 02-Sep-2008 11:03:59.  
Hi,

I'm having one custom property (e.g. IsCompleted) in entity class (e.g. Job entity) written between custom entity code. I want to add filter on this condition. How can I achieve that? I want to do something like:

filter.PredicateExpression.Add(IsCompleted==true);
Regards,

Viresh Shah
 
Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14585 posts
# Posted on: 02-Sep-2008 11:15:46.  
Code:
filter.PredicateExpression.Add(new EntityProperty("IsCompleted") == true);


  Top
Viresh
User



Location:
Ahmedabad, India
Joined on:
28-Jan-2008 08:52:54
Posted:
31 posts
# Posted on: 02-Sep-2008 11:37:37.  
Thanks walaa for yr reply. But it's complaining about type cast. Can't figure out what it accepts?

Unable to cast object of type 'SD.LLBLGen.Pro.ORMSupportClasses.EntityProperty' to type 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityField2'.
Regards,

Viresh Shah
 
Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14585 posts
# Posted on: 02-Sep-2008 12:18:35.  
If you are trying to filter on the database side on an entity property that's not mapped to a database field, this won't work. But rathe you should filter on the client side an EntityView.


  Top
Viresh
User



Location:
Ahmedabad, India
Joined on:
28-Jan-2008 08:52:54
Posted:
31 posts
# Posted on: 02-Sep-2008 12:47:24.  
You're right. It's a user defined property which is not mapped with database field.

I achieved that using EntityView. Thanks Walaa.
Regards,

Viresh Shah
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.