-
Notifications
You must be signed in to change notification settings - Fork 257
Expand file tree
/
Copy pathTablePartitioning.cs
More file actions
34 lines (30 loc) · 1.24 KB
/
TablePartitioning.cs
File metadata and controls
34 lines (30 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Microsoft.EntityFrameworkCore.Utilities;
namespace Microsoft.EntityFrameworkCore.Metadata
{
/// <summary>
/// Represents the Metadata for the partitioning of a table.
/// </summary>
public class TablePartitioning
{
/// <summary>
/// The type of partitioning to use.
/// </summary>
public TablePartitioningType Type { get; }
/// <summary>
/// The entity's properties to use as key for the partitioning.
/// </summary>
public IReadOnlyProperty[] PartitionKeyProperties { get; }
/// <summary>
/// Creates a <see cref="TablePartitioning"/>.
/// </summary>
/// <param name="type">The type of partitioning to use.</param>
/// <param name="partitionKeyProperties">The entity properties to use as key for the partitioning.</param>
/// <exception cref="ArgumentException"><paramref name="partitionKeyProperties"/></exception>
public TablePartitioning(TablePartitioningType type, IReadOnlyProperty[] partitionKeyProperties)
{
Check.NotEmpty(partitionKeyProperties, nameof(partitionKeyProperties));
Type = type;
PartitionKeyProperties = partitionKeyProperties;
}
}
}