A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/MapsterMapper/Mapster/wiki/Shallow-merge below:

Shallow merge · MapsterMapper/Mapster Wiki · GitHub

Deep copy vs shallow copy

By default, Mapster will recursively map nested objects (deep copy). You can do shallow copying by setting ShallowCopyForSameType to true.

TypeAdapterConfig<TSource, TDestination>
    .NewConfig()
    .ShallowCopyForSameType(true);

By default, Mapster will map all properties, even source properties containing null values. You can copy only properties that have values (merge) by using IgnoreNullValues method.

TypeAdapterConfig<TSource, TDestination>
    .NewConfig()
    .IgnoreNullValues(true);

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4