16 lines
444 B
C#
16 lines
444 B
C#
|
|
namespace SIGCM2.Domain.Exceptions;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Thrown when attempting to create/update a Product referencing an inactive Rubro. → HTTP 422
|
||
|
|
/// </summary>
|
||
|
|
public sealed class RubroInactivoException : DomainException
|
||
|
|
{
|
||
|
|
public int RubroId { get; }
|
||
|
|
|
||
|
|
public RubroInactivoException(int rubroId)
|
||
|
|
: base($"El rubro con id={rubroId} está inactivo y no puede asignarse a un producto.")
|
||
|
|
{
|
||
|
|
RubroId = rubroId;
|
||
|
|
}
|
||
|
|
}
|