You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 96088ce
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/FluentCommand.SqlServer/Merge/DataMergeDefinition.cs
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,27 @@ public DataMergeDefinition()
65
65
/// </value>
66
66
publicboolIncludeDelete{get;set;}
67
67
68
+
/// <summary>
69
+
/// Gets or sets the name of the column in the <see cref="TargetTable"/> used to flag rows as soft deleted.
70
+
/// When <see cref="IncludeDelete"/> is <c>true</c> and this value is set, target rows not found in the source
71
+
/// are updated with <see cref="SoftDeleteValue"/> instead of being deleted.
72
+
/// </summary>
73
+
/// <value>
74
+
/// The soft delete column name, or <c>null</c> to use hard delete.
75
+
/// </value>
76
+
/// <remarks>
77
+
/// Soft deleted rows are reported with an <c>UPDATE</c> action in merge output.
78
+
/// </remarks>
79
+
publicstring?SoftDeleteColumn{get;set;}
80
+
81
+
/// <summary>
82
+
/// Gets or sets the value assigned to <see cref="SoftDeleteColumn"/> when a row is soft deleted.
83
+
/// </summary>
84
+
/// <value>
85
+
/// The soft delete value.
86
+
/// </value>
87
+
publicobject?SoftDeleteValue{get;set;}
88
+
68
89
/// <summary>
69
90
/// Gets or sets a value indicating whether to output the inserted, updated, or deleted values from the <see cref="TargetTable"/> after the merge operation.
sql.Should().Contain("WHEN NOT MATCHED BY SOURCE AND (t.[IsDeleted] IS NULL OR t.[IsDeleted] <> 1) THEN \r\n UPDATE SET t.[IsDeleted] = 1".ReplaceLineEndings());
0 commit comments