Calculated field in typed list

Posts   
 
    
banusi
User
Posts: 43
Joined: 08-Jul-2006
# Posted on: 13-May-2008 14:39:42   

Hi

I have made a typed list from an entity and with a lot of 1-1 relations.

I have made a partial class for the entity and added code for a property/column.

My question is now. How can I add this field to the typed list?

I have looked in the source code for the typed list and there is a lot of places for a column to add. And there is also a const int AmountOfFields.

banusi
User
Posts: 43
Joined: 08-Jul-2006
# Posted on: 13-May-2008 14:49:01   

Just a comment

I know I can do it in the database by trigger / expression, but I wan't to do it in llblgen. Also the code for the field is not so good to code in tsql, because there is a lot of string operations for the field.

Can I use projections?

banusi
User
Posts: 43
Joined: 08-Jul-2006
# Posted on: 13-May-2008 14:54:51   

I look at OnResultsetBuilt. Myabe it can solve my problem

Posts: 1263
Joined: 10-Mar-2006
# Posted on: 13-May-2008 20:09:40   

You can extend the 'Row' class that is generated using partial classes, then it will be there.

goose avatar
goose
User
Posts: 392
Joined: 06-Aug-2007
# Posted on: 13-May-2008 23:10:33   

how exactly did you

I have made a partial class for the entity and added code for a property/column.

, a code snippet may help us to find you a solution. At this point seems to me that the new column you added to the entity does not exists in the database right? and typedlist columns are usually direct maps to database fields.