-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDatabaseQueryMapper.cs
More file actions
22 lines (19 loc) · 955 Bytes
/
DatabaseQueryMapper.cs
File metadata and controls
22 lines (19 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/CoreEx
using CoreEx.Mapping;
using System;
namespace CoreEx.Database
{
/// <summary>
/// Enables a database query only <see cref="IDatabaseMapper{T}"/>.
/// </summary>
/// <typeparam name="T">The resulting <see cref="Type"/>.</typeparam>
public abstract class DatabaseQueryMapper<T> : IDatabaseMapper<T>
{
/// <inheritdoc/>
/// <remarks>This method will result in a <see cref="NotSupportedException"/>.</remarks>
public abstract T MapFromDb(DatabaseRecord record, OperationTypes operationType = OperationTypes.Unspecified);
/// <inheritdoc/>
/// <remarks>This method will result in a <see cref="NotSupportedException"/>.</remarks>
void IDatabaseMapper<T>.MapToDb(T? value, DatabaseParameterCollection parameters, OperationTypes operationType) => throw new NotSupportedException();
}
}