• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

loresoft / FluentCommand / 10949537713

19 Sep 2024 09:58PM UTC coverage: 54.499%. First build
10949537713

push

github

pwelter34
minor data merge extension

1672 of 3548 branches covered (47.13%)

Branch coverage included in aggregate %.

0 of 3 new or added lines in 1 file covered. (0.0%)

4221 of 7265 relevant lines covered (58.1%)

228.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

44.44
/src/FluentCommand.SqlServer/Merge/DataMergeExtensions.cs
1
namespace FluentCommand.Merge;
2

3
/// <summary>
4
/// <see cref="IDataSession"/> extension methods
5
/// </summary>
6
public static class DataMergeExtensions
7
{
8
    /// <summary>
9
    /// Starts a data merge operation with the specified destination table name.
10
    /// </summary>
11
    /// <param name="session">The session to use for the merge.</param>
12
    /// <param name="destinationTable">Name of the destination table on the server.</param>
13
    /// <returns>
14
    /// A fluent <see langword="interface" /> to a <see cref="DataMerge " /> operation.
15
    /// </returns>
16
    public static IDataMerge MergeData(this IDataSession session, string destinationTable)
17
    {
18
        var definition = new DataMergeDefinition();
7✔
19
        definition.TargetTable = destinationTable;
7✔
20

21
        return MergeData(session, definition);
7✔
22
    }
23

24
    /// <summary>
25
    /// Starts a data merge operation with the specified <typeparamref name="TEntity"/>
26
    /// </summary>
27
    /// <param name="session">The session to use for the merge.</param>
28
    /// <returns>
29
    /// A fluent <see langword="interface" /> to a <see cref="DataMerge " /> operation.
30
    /// </returns>
31
    public static IDataMerge MergeData<TEntity>(this IDataSession session)
32
    {
33
        var definition = DataMergeDefinition.Create<TEntity>();
×
34
        return MergeData(session, definition);
×
35
    }
36

37
    /// <summary>
38
    /// Starts a data merge operation with the specified <paramref name="mergeDefinition"/>.
39
    /// </summary>
40
    /// <param name="session">The session to use for the merge.</param>
41
    /// <param name="mergeDefinition">The data merge definition.</param>
42
    /// <returns>
43
    /// A fluent <see langword="interface" /> to a <see cref="DataMerge " /> operation.
44
    /// </returns>
45
    public static IDataMerge MergeData(this IDataSession session, DataMergeDefinition mergeDefinition)
46
    {
47
        return new DataMerge(session, mergeDefinition);
7✔
48
    }
49

50

51
    /// <summary>
52
    /// Sets the wait time before terminating the attempt to execute a command and generating an error.
53
    /// </summary>
54
    /// <param name="dataMerge">The <see cref="IDataMerge"/> for this extension method.</param>
55
    /// <param name="timeSpan">The <see cref="TimeSpan"/> to wait for the command to execute.</param>
56
    /// <returns>
57
    /// A fluent <see langword="interface" /> to the data command.
58
    /// </returns>
59
    public static IDataMerge CommandTimeout(
60
        this IDataMerge dataMerge,
61
        TimeSpan timeSpan)
62
    {
NEW
63
        var timeout = Convert.ToInt32(timeSpan.TotalSeconds);
×
NEW
64
        dataMerge.CommandTimeout(timeout);
×
NEW
65
        return dataMerge;
×
66
    }
67

68
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc