entitynameFields classes

Posts   
 
    
FredL
User
Posts: 5
Joined: 29-Jun-2005
# Posted on: 24-Sep-2006 05:09:47   

I have an entity named _LockEntity _and am attempting to create a predicateExpression for filtering. Based on your documentation, I think this is the right syntax.


IPredicateExpression predicateExpression = new PredicateExpression();
predicateExpression.Add(LockEntityFields.LockExpirationDate < DateTime.Now);

The problem is that no _LockEntityFields _class exists. I am sure that I missed something. Do I have to create the entitynameFields class? Could you please point me in thr right direction. Thanks...

Fred

JimHugh
User
Posts: 191
Joined: 16-Nov-2005
# Posted on: 24-Sep-2006 06:11:39   

Add a using statement to your code that references DatabaseGeneric.HelperClasses (where DatabaseGeneric is the namespace you specified when you generated the code).

FredL
User
Posts: 5
Joined: 29-Jun-2005
# Posted on: 24-Sep-2006 22:19:41   

The reference you mentioned was already added to my code. I have recently upgraded to version 2 of LLBLGEN and maybe I have not set all of my option correctly. I am using the SelfServing template group and my target platform is .net 2.0.

Are these classes generated by LLBLGEN or do I have to create them in my own code?

Thanks,

Fred

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 25-Sep-2006 09:46:08   

They're generated by llblgen pro, they're in the helperclasses namespace.

Could you check if vs.net has included the file in your generated code project? In solution explorer in vs.net you can view files which are in the folder but not in the project.

Frans Bouma | Lead developer LLBLGen Pro
FredL
User
Posts: 5
Joined: 29-Jun-2005
# Posted on: 25-Sep-2006 19:41:43   

I solved the problem but am not quite sure how. Here is what I did.

  1. Set the CleanUpVSNetProjects to true.

  2. Explicitly set the participating objects in the generate dialog box. I don’t think this was necessary.

  3. Deleted all content in my VS project so essentially I started with an empty project. I think that item 1 essentially accomplished this.

  4. Added the newly generated LLBLGEN files to the empty project.

  5. Rebuilt the project.

  6. Everything now works fine.

Do you have any idea what might have caused this problem? Thanks…

Fred

Jessynoo avatar
Jessynoo
Support Team
Posts: 296
Joined: 19-Aug-2004
# Posted on: 25-Sep-2006 21:32:48   

Hi,

Maybe the previous generation had failed updating the project files with the new v2 classes. There is also a flag in the scenario that states what to do with an existing project, but it should be ok if you did not touch it.

anyway it works so that's essential...