Show / Hide Table of Contents

    ISqlParameter.Direction Property

    .NET Standard 2.x

    Gets a value that indicates whether the parameter is input-only, output-only, bidirectional or a stored procedure return value parameter.

    Namespace: SnapObjects.Data

    Assembly: SnapObjects.Data.dll

    Syntax

       ParameterDirection Direction { get; }
    

    Property Value

    System.Data.ParameterDirection

    One of the ParameterDirection values. The default is Input.

    Examples

    The following code example gets the data direction of the SQL query parameter.

    using SnapObjects.Data;
    using System;
    
    namespace Appeon.ApiDoc.ISqlParameterExamples
    {
        public class DirectionExample
        {
            private readonly SchoolContext _context;
            public DirectionExample(SchoolContext context)
            {
                _context = context;
            }
    
            public void Example()
            {
                ISqlParameter param = SqlBuilder.Parameter(typeof(int), "id");
                var direction = param.Direction;
    
                Console.WriteLine("Data Direction = {0}", direction);
    
                /*This code produces the following output:
    
                Data Direction = Input
               */
            }
        }
    }
    

    Applies to

    .NET Standard

    2.x

    Back to top Generated by Appeon