You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.0 KiB

using System;
using System.Collections.Generic;
using System.Text;
namespace Apewer.Source
{
/// <summary>用于执行 SQL 语句的参数。</summary>
[Serializable]
public class Parameter
{
/// <summary>名称,不可设置位为空。</summary>
public string Name { get; set; }
/// <summary>值。</summary>
public object Value { get; set; }
/// <summary>类型。</summary>
public ColumnType Type { get; set; }
/// <summary>类型为 VarChar 时,指定长度。</summary>
public int Size { get; set; }
/// <summary>创建用于执行 SQL 语句的参数,名称不可设置位为空。</summary>
/// <exception cref="ArgumentException"></exception>
/// <exception cref="ArgumentNullException"></exception>
public Parameter(string name, object value, ColumnType type, int size = 0)
{
Name = name;
Value = value;
Type = type;
Size = size;
}
}
}