ObjectParameter Constructor

 

Initializes a new instance of the ObjectParameter class.

Namespace:   System.Data.Entity.Core.Objects
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodObjectParameter(String, Object)

Initializes a new instance of the ObjectParameter class with the specified name and value.

System_CAPS_pubmethodObjectParameter(String, Type)

Initializes a new instance of the ObjectParameter class with the specified name and type.


ObjectParameter Constructor (String, Object)

Initializes a new instance of the ObjectParameter class with the specified name and value.

public ObjectParameter(
	string name,
	object value
)

Parameters

name
Type: System.String

The parameter name. This name should not include the "@" parameter marker that is used in Entity SQL statements, only the actual name. The first character of the expression must be a letter. Any successive characters in the expression must be either letters, numbers, or an underscore (_) character.

value
Type: System.Object

The initial value (and inherently, the type) of the parameter.

Exception Condition
ArgumentNullException

If the value of either argument is null.

ArgumentOutOfRangeException

If the value of the name argument is not valid. Parameter names must start with a letter and can only contain letters, numbers, and underscores.


ObjectParameter Constructor (String, Type)

Initializes a new instance of the ObjectParameter class with the specified name and type.

public ObjectParameter(
	string name,
	Type type
)

Parameters

name
Type: System.String

The parameter name. This name should not include the "@" parameter marker that is used in the Entity SQL statements, only the actual name. The first character of the expression must be a letter. Any successive characters in the expression must be either letters, numbers, or an underscore (_) character.

type
Type: System.Type

The common language runtime (CLR) type of the parameter.

Exception Condition
ArgumentNullException

If the value of either argument is null.

ArgumentOutOfRangeException

If the value of the name argument is invalid. Parameter names must start with a letter and can only contain letters, numbers, and underscores.