forked from dotnet/efcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDbUpdateException.cs
More file actions
50 lines (42 loc) · 1.47 KB
/
Copy pathDbUpdateException.cs
File metadata and controls
50 lines (42 loc) · 1.47 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using JetBrains.Annotations;
using Microsoft.Data.Entity.ChangeTracking.Internal;
using Microsoft.Data.Entity.Utilities;
namespace Microsoft.Data.Entity
{
public class DbUpdateException : Exception
{
public DbUpdateException()
{
Entries = new List<InternalEntityEntry>();
}
public DbUpdateException([NotNull] string message)
: this(message, (Exception)null)
{
}
public DbUpdateException([NotNull] string message, [CanBeNull] Exception innerException)
: base(message, innerException)
{
Entries = new List<InternalEntityEntry>();
}
public DbUpdateException(
[NotNull] string message,
[NotNull] IReadOnlyList<InternalEntityEntry> entries)
: this(message, null, entries)
{
}
public DbUpdateException(
[NotNull] string message,
[CanBeNull] Exception innerException,
[NotNull] IReadOnlyList<InternalEntityEntry> entries)
: base(message, innerException)
{
Check.NotEmpty(entries, nameof(entries));
Entries = entries;
}
public virtual IReadOnlyList<InternalEntityEntry> Entries { get; }
}
}