In my database I have a datetime column that represents someone's birthdate.
Now I can easily calculate that persons age with a function that I wrote, but I was wondering if it is possible to add a custom property 'Age' to my entity in LLBLGen that will use my function .
The reason I need this is that I want to make a predicate like so:
predicate.Add(KandidaatFields.Age >= leeftijdVan);
but I don't know how to make the 'Age'-field available here.
My first idea was to make a TypeConverter that converts a DateTime field to a number of years (the age of the person), but I also need to preserve the original birthdate field with a datetime. The conversion would work only one way, so I guess this isn't a very good idea anyway.
Could you please give me some advice on the best way to go here?