23 lines
664 B
C#
23 lines
664 B
C#
namespace Galaeth.Core.Exceptions;
|
|
|
|
/// <summary>
|
|
/// Thrown if an entity has multiple primary keys defined.
|
|
/// </summary>
|
|
public class MultiplePrimaryKeysException : Exception
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="MultiplePrimaryKeysException"/> class.
|
|
/// </summary>
|
|
/// <param name="entityType">The entity causing the exception.</param>
|
|
public MultiplePrimaryKeysException(Type entityType)
|
|
: base($"Entity '{entityType}' contains multiple primary keys")
|
|
{
|
|
EntityType = entityType;
|
|
}
|
|
|
|
/// <summary>
|
|
/// The entity type.
|
|
/// </summary>
|
|
public Type EntityType { get; set; }
|
|
}
|