IComputeMeta.Expression Property
.NET Standard 2.x
Gets or sets the expression for a computed field control.
Namespace: DWNet.Data
Assembly: DWNet.Data.dll
Syntax
IExpressionable<object> Expression { get; set; }
Return
DWNet.Data.IExpressionable<object>
The expression for a computed field control.
Examples
The following code example demonstrates how to use the Expression property.
using DWNet.Data;
using System;
namespace Appeon.ApiDoc.IComputeMetaExamples
{
    public class ExpressionExample
    {
        private readonly SchoolContext _context;
        public ExpressionExample(SchoolContext dataContext)
        {
            // Sets the data context
            _context = dataContext;
        }
        public void Example()
        {
            // Instantiates datastore with datawindow: d_person_with_dwcompute
            var datastore = new DataStore("d_person_with_dwcompute", _context);
            datastore.Retrieve();
			
			// Gets the properties of the Computes.
            var computeMetas = datastore.DwMeta.Computes;
            Console.WriteLine("Computes Count: {0}", computeMetas.Count);
            foreach (var item in computeMetas)
            {
                Console.WriteLine("Column Name: {0}; Expression: {1}",
                    item.Name, item.Expression.Expression);
            }
            /*This code produces the following output:
            
            Computes Count: 1
            Column Name: Compute_Fullname; Expression: firstname + \" \" + lastname
            */
        }
    }
}
Example Refer To
Model Class: D_Person_With_Dwcompute 
DataWindow File: d_person_with_dwcompute 
Applies to
.NET Standard
2.x