Class MapToSqlVarCharAttribute
This attributes maps a model property to/from a SQL VarChar parameter or column.
Inheritance
System.Object
System.Attribute
MapToSqlVarCharAttribute
Inherited Members
System.Attribute.Equals(System.Object)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetHashCode()
System.Attribute.IsDefaultAttribute()
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.Match(System.Object)
System.Attribute.TypeId
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ArgentSea.Sql
Assembly: ArgentSea.Sql.dll
Syntax
public class MapToSqlVarCharAttribute : SqlParameterMapAttribute
Constructors
| Improve this Doc View SourceMapToSqlVarCharAttribute(String, Int32, Int32)
Map this property to the specified Ansi database column (note that because .NET is Unicode, NVarChar is recommended for most applications).
Declaration
public MapToSqlVarCharAttribute(string parameterName, int length, int localeId)
Parameters
Type | Name | Description |
---|---|---|
System.String | parameterName | The name of the parameter or column that contains the value. The system will automatically add or remove the prefix '@' as needed. |
System.Int32 | length | The maximum length of the string. Set to -1 for VarChar(max). |
System.Int32 | localeId | The Ansi code-page to use for Unicode text conversion. For en-US use: 1033. |
MapToSqlVarCharAttribute(String, Int32, Int32, Boolean)
Declaration
public MapToSqlVarCharAttribute(string parameterName, int length, int localeId, bool isRequired)
Parameters
Type | Name | Description |
---|---|---|
System.String | parameterName | |
System.Int32 | length | |
System.Int32 | localeId | |
System.Boolean | isRequired |
Properties
| Improve this Doc View SourceColumnName
Declaration
public override string ColumnName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
| Improve this Doc View SourceLength
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
LocaleId
Declaration
public int LocaleId { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ParameterName
Declaration
public override string ParameterName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
| Improve this Doc View SourceAppendInParameterExpressions(IList<Expression>, ParameterExpression, ParameterExpression, HashSet<String>, Expression, Type, ParameterExpression, ILogger)
Declaration
protected override void AppendInParameterExpressions(IList<Expression> expressions, ParameterExpression expSprocParameters, ParameterExpression expIgnoreParameters, HashSet<string> parameterNames, Expression expProperty, Type propertyType, ParameterExpression expLogger, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Linq.Expressions.Expression> | expressions | |
System.Linq.Expressions.ParameterExpression | expSprocParameters | |
System.Linq.Expressions.ParameterExpression | expIgnoreParameters | |
System.Collections.Generic.HashSet<System.String> | parameterNames | |
System.Linq.Expressions.Expression | expProperty | |
System.Type | propertyType | |
System.Linq.Expressions.ParameterExpression | expLogger | |
Microsoft.Extensions.Logging.ILogger | logger |
Overrides
| Improve this Doc View SourceAppendReaderExpressions(Expression, IList<MethodCallExpression>, IList<Expression>, ParameterExpression, ParameterExpression, ParameterExpression, ref Int32, Type, ParameterExpression, ILogger)
Declaration
protected override void AppendReaderExpressions(Expression expProperty, IList<MethodCallExpression> columnLookupExpressions, IList<Expression> expressions, ParameterExpression prmSqlRdr, ParameterExpression expOrdinals, ParameterExpression expOrdinal, ref int propIndex, Type propertyType, ParameterExpression expLogger, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | expProperty | |
System.Collections.Generic.IList<System.Linq.Expressions.MethodCallExpression> | columnLookupExpressions | |
System.Collections.Generic.IList<System.Linq.Expressions.Expression> | expressions | |
System.Linq.Expressions.ParameterExpression | prmSqlRdr | |
System.Linq.Expressions.ParameterExpression | expOrdinals | |
System.Linq.Expressions.ParameterExpression | expOrdinal | |
System.Int32 | propIndex | |
System.Type | propertyType | |
System.Linq.Expressions.ParameterExpression | expLogger | |
Microsoft.Extensions.Logging.ILogger | logger |
Overrides
| Improve this Doc View SourceAppendReadOutParameterExpressions(Expression, IList<Expression>, ParameterExpression, ParameterExpression, Type, ParameterExpression, ILogger)
Declaration
protected override void AppendReadOutParameterExpressions(Expression expProperty, IList<Expression> expressions, ParameterExpression expSprocParameters, ParameterExpression expPrm, Type propertyType, ParameterExpression expLogger, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | expProperty | |
System.Collections.Generic.IList<System.Linq.Expressions.Expression> | expressions | |
System.Linq.Expressions.ParameterExpression | expSprocParameters | |
System.Linq.Expressions.ParameterExpression | expPrm | |
System.Type | propertyType | |
System.Linq.Expressions.ParameterExpression | expLogger | |
Microsoft.Extensions.Logging.ILogger | logger |
Overrides
| Improve this Doc View SourceAppendSetOutParameterExpressions(IList<Expression>, ParameterExpression, ParameterExpression, HashSet<String>, ParameterExpression, ILogger)
Declaration
protected override void AppendSetOutParameterExpressions(IList<Expression> expressions, ParameterExpression expSprocParameters, ParameterExpression expIgnoreParameters, HashSet<string> parameterNames, ParameterExpression expLogger, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Linq.Expressions.Expression> | expressions | |
System.Linq.Expressions.ParameterExpression | expSprocParameters | |
System.Linq.Expressions.ParameterExpression | expIgnoreParameters | |
System.Collections.Generic.HashSet<System.String> | parameterNames | |
System.Linq.Expressions.ParameterExpression | expLogger | |
Microsoft.Extensions.Logging.ILogger | logger |
Overrides
| Improve this Doc View SourceAppendTvpExpressions(ParameterExpression, Expression, IList<Expression>, IList<NewExpression>, HashSet<String>, ref Int32, Type, ParameterExpression, ParameterExpression, ILogger)
Declaration
protected override void AppendTvpExpressions(ParameterExpression expRecord, Expression expProperty, IList<Expression> setExpressions, IList<NewExpression> sqlMetaDataTypeExpressions, HashSet<string> parameterNames, ref int ordinal, Type propertyType, ParameterExpression expColumnList, ParameterExpression expLogger, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ParameterExpression | expRecord | |
System.Linq.Expressions.Expression | expProperty | |
System.Collections.Generic.IList<System.Linq.Expressions.Expression> | setExpressions | |
System.Collections.Generic.IList<System.Linq.Expressions.NewExpression> | sqlMetaDataTypeExpressions | |
System.Collections.Generic.HashSet<System.String> | parameterNames | |
System.Int32 | ordinal | |
System.Type | propertyType | |
System.Linq.Expressions.ParameterExpression | expColumnList | |
System.Linq.Expressions.ParameterExpression | expLogger | |
Microsoft.Extensions.Logging.ILogger | logger |
Overrides
| Improve this Doc View SourceIsValidType(Type)
Declaration
public override bool IsValidType(Type candidateType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | candidateType |
Returns
Type | Description |
---|---|
System.Boolean |