Tools/LinqToSqlExtensions.cs
/// <summary>
/// Returns a clone (via copying all properties) of an existing DbParameter.
/// </summary>
/// <param name="src">The DbParameter to clone.</param>
/// <returns>Returns a clone (via copying all properties) of an existing DbParameter.</returns>
Returns a clone (via copying all properties) of an existing DbParameter.
Returns a clone ( via copying all properties ) of an existing DbParameter .
private static DbParameter CloneParameter( DbParameter src )
		{
			SqlParameter source = (SqlParameter)src;
			SqlParameter destination = new SqlParameter();
			destination.Value = source.Value;
			destination.Direction = source.Direction;
			destination.Size = source.Size;
			destination.Offset = source.Offset;
			destination.SourceColumn = source.SourceColumn;
			destination.SourceVersion = source.SourceVersion;
			destination.SourceColumnNullMapping = source.SourceColumnNullMapping;
			destination.IsNullable = source.IsNullable;
			destination.CompareInfo = source.CompareInfo;
			destination.XmlSchemaCollectionDatabase = source.XmlSchemaCollectionDatabase;
			destination.XmlSchemaCollectionOwningSchema = source.XmlSchemaCollectionOwningSchema;
			destination.XmlSchemaCollectionName = source.XmlSchemaCollectionName;
			destination.UdtTypeName = source.UdtTypeName;
			destination.TypeName = source.TypeName;
			destination.ParameterName = source.ParameterName;
			destination.Precision = source.Precision;
			destination.Scale = source.Scale;
			return destination;
        }
private static DbParameter CloneParameter ( DbParameter src ) { SqlParameter source = ( SqlParameter ) src ; SqlParameter destination = new SqlParameter ( ) ; destination . Value = source . Value ; destination . Direction = source . Direction ; destination . Size = source . Size ; destination . Offset = source . Offset ; destination . SourceColumn = source . SourceColumn ; destination . SourceVersion = source . SourceVersion ; destination . SourceColumnNullMapping = source . SourceColumnNullMapping ; destination . IsNullable = source . IsNullable ; destination . CompareInfo = source . CompareInfo ; destination . XmlSchemaCollectionDatabase = source . XmlSchemaCollectionDatabase ; destination . XmlSchemaCollectionOwningSchema = source . XmlSchemaCollectionOwningSchema ; destination . XmlSchemaCollectionName = source . XmlSchemaCollectionName ; destination . UdtTypeName = source . UdtTypeName ; destination . TypeName = source . TypeName ; destination . ParameterName = source . ParameterName ; destination . Precision = source . Precision ; destination . Scale = source . Scale ; return destination ; }
Returns a clone (via copying all properties) of an existing DbParameter.
Returns a clone ( via copying all properties ) of an existing DbParameter .
Returns a clone (via copying all properties) of an existing DbParameter.
Returns a clone ( via copying all properties ) of an existing DbParameter .
src
DbParameter
The DbParameter to clone.
The DbParameter to clone .