IDwMeta.Computes Property
.NET Standard 2.x
Gets the computed controls in the DataWindow.
Namespace: DWNet.Data
Assembly: DWNet.Data.dll
Syntax
IMetaList<IComputeMeta> Computes { get; }
Return
DWNet.Data.IMetaList<IComputeMeta>
The computed controls in the DataWindow.
Examples
The following code example demonstrates how to use the Computes property.
using DWNet.Data;
using System;
namespace Appeon.ApiDoc.IDwMetaExamples
{
public class ComputesExample
{
private readonly SchoolContext _context;
public ComputesExample(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