23 lines
728 B
C#
23 lines
728 B
C#
namespace Galaeth.Core.Exceptions;
|
|
|
|
/// <summary>
|
|
/// Thrown if an entity has a property that has a primary key attribute, but no column attribute.
|
|
/// </summary>
|
|
public class MissingColumnAttributeException : Exception
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="MissingColumnAttributeException"/> class.
|
|
/// </summary>
|
|
/// <param name="entityType">The entity causing the exception.</param>
|
|
public MissingColumnAttributeException(Type entityType)
|
|
: base($"Entity '{entityType}' primary key requires a ColumnMapping attribute")
|
|
{
|
|
EntityType = entityType;
|
|
}
|
|
|
|
/// <summary>
|
|
/// The entity type.
|
|
/// </summary>
|
|
public Type EntityType { get; set; }
|
|
}
|