...
Delegate expressions (and custom functionsExpression Eigene Funktionen) have the following advantages:
...
They cannot be mapped to the database (there is a mechanism for a mechanism for mapping custom functions to databases. See Expression Eigene Funktionen)
They cannot be serialized in remoting drivers
They cannot be analyzed by Quino
...
The next example shows how to get this property with a delegate, but without any dependency on generated codeMetadata Generated.
Code Block |
---|
personBuilder .Add .CalculatedProperty("Seniority", MetaType.Integer) .ValueExpression<Person>(c => c.YearsActive + 1); |
...
At the same time, you can see how powerful and useful the text-formatting language isExpression Text Formatierung is: the GetSalutation()
method has a lot of hand-coding just to get the same behavior as the much shorter text-formatting expression.
...