IntegerConstantExpression
Table of Contents
What it is
IntegerConstantExpression is used to create a Constant of the type Integer. A Constant is assigned when it is defined and can not be assigned during a session. The way it is used in the AI-Framework is by assigning a value in the code (so-called hard-coded), which will be translated into a IntegerConstantExpression by the AI-Framework.
- See LINQ for details about LINQ and the AI-Framework.
- Go to the category for all LINQ expressions.
Code example
private IEntityCollection<ArticleEntity> ArticlesToBeDeleted
{
get
{
return Property(() =>
Article.Select<ArticleEntity>
(AutoLoad.Off).Where(a =>
a.ArticlePrice.Matches(1, false, true)));
}
}
Explanation of the example
This is the definition of an Entity, based on ArticleEntity, with the name ArticlesToBeDeleted.
In it is a selection, where the ArticlePrice must match a Integer Constant, in this example 1.
So ArticlesToBeDeleted is a subset of ArticleEntity. The subset contains the records where ArticlePrice equals 1.