Show / Hide Table of Contents

    IReportMeta.DataObject Property

    .NET Standard 2.x

    Gets or sets the DataObject name of the DataWindow report.

    Namespace: DWNet.Data

    Assembly: DWNet.Data.dll

    Syntax

    string DataObject { get; set; }
    

    Return

    System.String

    The DataObject name for the DataWindow.

    Examples

    The following code example demonstrates how to use the DataObject property.

    using DWNet.Data;
    using System;
    
    namespace Appeon.ApiDoc.IReportMetaExamples
    {
        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_with_report
                var datastore = new DataStore("d_department_with_report", _context);
    
                datastore.Retrieve();
    
                // Gets the model embedded in the DataStore.
                var reportMetas = datastore.DwMeta.Reports;
                Console.WriteLine("Reports Count: {0}", reportMetas.Count);
    
                foreach (var item in reportMetas)
                {
                    Console.WriteLine("DataObject: {0}", item.DataObject);
                }
    
                /*This code produces the following output:
                
                Reports Count: 1
                DataObject: d_course_with_param
                */
            }
        }
    }
    

    Example Refer To

    Model Class: D_Department_With_Report
    DataWindow File: d_department_with_report

    Applies to

    .NET Standard

    2.x

    Back to top Generated by Appeon