IMetaList<TDwo>.This[string name] Property
.NET Standard 2.x
Gets or sets an element by name.
Namespace: DWNet.Data
Assembly: DWNet.Data.dll
Syntax
TDwo this[string name] { get; set; }
Return
TDwo
The element at the specified name.
Examples
The following code example demonstrates how to use the Index property.
using DWNet.Data;
using System;
namespace Appeon.ApiDoc.IMetaListExamples
{
public class Index2Example
{
private readonly SchoolContext _context;
public Index2Example(SchoolContext dataContext)
{
// Sets the data context
_context = dataContext;
}
public void Example()
{
// Instantiates datastore with datawindow: d_department
var datastore = new DataStore("d_department", _context);
datastore.Retrieve();
// Gets the properties of the Columns.
var columnMetas = datastore.DwMeta.Columns;
Console.WriteLine("Columns Count: {0}", columnMetas.Count);
// Gets the ID and name of the first column.
Console.WriteLine("Column Name: {0}; ID: {1}",
columnMetas["Departmentid"].Name, columnMetas["Departmentid"].ID);
/*This code produces the following output:
Columns Count: 5
Column Name: Departmentid; ID: 0
*/
}
}
}
Example Refer To
Model Class: D_Department
DataWindow File: d_department
Applies to
.NET Standard
2.x