public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if (Quantity < ReceivedAmount)
{
yield return new ValidationResult("Received amount can not be greater than Dispatched amount!");
}
if(Quantity < LossAmount)
{
yield return new ValidationResult("Loss Amount can not be greater than Dispatched amount");
}
if (LossAmount > 0)
{
if (Quantity < (ReceivedAmount + LossAmount))
{
yield return
new ValidationResult(
"The sum of loss amount and received amount can not be greater than dispatched amount");
}
}
}