Skip to content

Commit c4d28de

Browse files
committed
Refactor SqlInsert.Clone()
1 parent f8d31fb commit c4d28de

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Orm/Xtensive.Orm/Sql/Dml/Statements/SqlInsert.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,16 @@ public class SqlInsert : SqlQueryStatement, ISqlCompileUnit
3737

3838
internal override SqlInsert Clone(SqlNodeCloneContext context) =>
3939
context.GetOrAdd(this, static (t, c) => {
40-
SqlInsert clone = new SqlInsert();
41-
clone.Into = t.Into?.Clone(c);
42-
clone.From = t.From?.Clone(c);
43-
clone.ValueRows = t.ValueRows.Clone(c);
40+
var clone = new SqlInsert {
41+
Into = t.Into?.Clone(c),
42+
From = t.From?.Clone(c),
43+
ValueRows = t.ValueRows.Clone(c)
44+
};
4445

45-
if (t.Hints.Count > 0)
46+
if (t.Hints.Count > 0) {
4647
foreach (SqlHint hint in t.Hints)
4748
clone.Hints.Add((SqlHint) hint.Clone(c));
49+
}
4850
return clone;
4951
});
5052

0 commit comments

Comments
 (0)