Exemple #1
0
 /// <summary>
 /// Fill the specified target object given the source object.
 /// Relational objects that appear in the exclusions parameter will be ignored.
 /// </summary>
 /// <param name="source">Source object.</param>
 /// <param name="target">Target object to fill.</param>
 /// <param name="exclusions">Linq expression representing the relational objects to ignore.</param>
 /// <returns></returns>
 public static void FillExclude <TSource, TTarget>(TSource source, TTarget target, params Expression <Func <TTarget, object> >[] exclusions)
 {
     _Fill(source, target, MapMode.Exclude, IncludeChain.CreateFromLambdas(exclusions));
 }
Exemple #2
0
 /// <summary>
 /// Create a mapped object given the source object.
 /// Relational objects that appear in the exclusions parameter will be ignored.
 /// </summary>
 /// <typeparam name="TTarget">Type of the target object</typeparam>
 /// <param name="source">Source object</param>
 /// <param name="exclusions">Linq expression representing the relational objects to ignore.</param>
 /// <returns>The generated target object.</returns>
 public static TTarget MapExclude <TSource, TTarget>(TSource source, params Expression <Func <TTarget, object> >[] exclusions)
 {
     return(_Map <TSource, TTarget>(source, MapMode.Exclude, IncludeChain.CreateFromLambdas(exclusions)));
 }