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

Avanade / NTangle / 11153168331

02 Oct 2024 11:30PM UTC coverage: 64.325% (-1.2%) from 65.572%
11153168331

push

github

web-flow
Merge pull request #50 from Avanade/v2.6.0

v2.6.0

141 of 240 branches covered (58.75%)

Branch coverage included in aggregate %.

3 of 5 new or added lines in 5 files covered. (60.0%)

4 existing lines in 3 files now uncovered.

564 of 856 relevant lines covered (65.89%)

16.08 hits per line

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

90.0
/src/NTangle/Data/IdentifierMappingMapperBase.cs
1
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/NTangle
2

3
using CoreEx;
4
using CoreEx.Database;
5
using CoreEx.Database.SqlServer;
6
using CoreEx.Mapping;
7
using NTangle.Cdc;
8
using System;
9

10
namespace NTangle.Data
11
{
12
    /// <summary>
13
    /// Represents the <see cref="IdentifierMapping{T}"/> database mapper. 
14
    /// </summary>
15
    /// <typeparam name="T">The global identifier <see cref="System.Type"/>.</typeparam>
16
    /// <param name="dbTypeName">The database type name for the <see cref="TableValuedParameter"/>.</param>
17
    public abstract class IdentifierMappingMapperBase<T>(string dbTypeName) : IDatabaseMapper<IdentifierMapping<T>>
3✔
18
    {
19

20
        /// <summary>
21
        /// Gets the database type name for the <see cref="TableValuedParameter"/>.
22
        /// </summary>
23
        public string DbTypeName { get; } = dbTypeName.ThrowIfNull(nameof(dbTypeName));
3✔
24

25
        /// <inheritdoc/>
26
        public IdentifierMapping<T>? MapFromDb(DatabaseRecord record, OperationTypes operationType) => new()
10✔
27
        {
10✔
28
            Schema = record.GetValue<string>(nameof(IdentifierMapping<T>.Schema)),
10✔
29
            Table = record.GetValue<string>(nameof(IdentifierMapping<T>.Table)),
10✔
30
            Key = record.GetValue<string>(nameof(IdentifierMapping<T>.Key)),
10✔
31
            GlobalId = record.GetValue<T>(nameof(IdentifierMapping<T>.GlobalId))
10✔
32
        };
10✔
33

34
        /// <inheritdoc/>
UNCOV
35
        void IDatabaseMapper<IdentifierMapping<T>>.MapToDb(IdentifierMapping<T>? value, DatabaseParameterCollection parameters, OperationTypes operationType) => throw new NotImplementedException();
×
36
    }
37
}
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