A Sandcastle Documented Class Library

# ModelDataExtensions CopyTo TSource, TTarget Method (TSource, TTarget, IReadOnlyDictionary String, Action TSource, TTarget )

Copies properties from the source type to the target type using default mapping rule - mapping by name.

Namespace: Dundas.BI.WebApi.Models
Assembly: Dundas.BI.WebApi (in Dundas.BI.WebApi.dll) Version: 2.0.0.0 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    public static void CopyTo<TSource, TTarget>(
    	this TSource source,
    	TTarget target,
    	IReadOnlyDictionary<string, Action<TSource, TTarget>> mappingRules
    )

    <ExtensionAttribute>
    Public Shared Sub CopyTo(Of TSource, TTarget) (
    	source As TSource,
    	target As TTarget,
    	mappingRules As IReadOnlyDictionary(Of String, Action(Of TSource, TTarget))
    )

    public:
    [ExtensionAttribute]
    generic<typename TSource, typename TTarget>
    static void CopyTo(
    	TSource source,
    	TTarget target,
    	IReadOnlyDictionary<String^, Action<TSource, TTarget>^>^ mappingRules
    )

    [<ExtensionAttribute>]
    static member CopyTo :
            source : 'TSource *
            target : 'TTarget *
            mappingRules : IReadOnlyDictionary<string, Action<'TSource, 'TTarget>> -> unit

#### Parameters

source
  Type: TSource
  The source object - object which properties will be copied over the target.
target
  Type: TTarget
  The target object - object which properties will be copied on to.
mappingRules
  Type: System.Collections.Generic
  IReadOnlyDictionary
  String, Action
  TSource, TTarget
  The mapping rules.

#### Type Parameters

TSource
  The type of the source.
TTarget
  The type of the target.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

#### Reference

ModelDataExtensions Class
CopyTo Overload
Dundas.BI.WebApi.Models Namespace