IDataStore.DataObject Property
.NET Standard 2.x
Specifies the name of the DataWindow object
associated with the DataStore.
Namespace: DWNet.Data
Assembly: DWNet.Data.dll
Syntax
public string DataObject { get; set; }
Remarks
System.String
The name of the DataWindow object
associated with the DataStore.
Examples
The following code example demonstrates how to use the DataObject
property.
using DWNet.Data;
using System;
namespace Appeon.ApiDoc.IDataStoreExamples
{
public class DataObjectExample
{
private readonly SchoolContext _context;
public DataObjectExample(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();
Console.WriteLine("The name of the current DataStore: {0}",
datastore.DataObject);
Console.WriteLine("Department Rowcount: {0}",
datastore.RowCount);
// Modifies DataObject from "d_department" to "d_person".
datastore.DataObject = "d_person";
datastore.Retrieve();
Console.WriteLine("The name of the DataStore after modified: {0}",
datastore.DataObject);
Console.WriteLine("Person Rowcount: {0}",
datastore.RowCount);
/*This code produces the following output:
The name of the current DataStore: d_department
Department Rowcount: 4
The name of the DataStore after modified: d_person
Person Rowcount: 36
*/
}
}
}
Example Refer To
Model Class: D_Department
DataWindow Files: d_department d_person
Applies to
.NET Standard
2.x