Compare commits
1 Commits
LabWorks01
...
LabWork01_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
106bcad01c |
@@ -19,7 +19,7 @@ public class FurnitureComponentDataModel(string furnitureId, string componentId,
|
||||
if (ComponentId.IsEmpty())
|
||||
throw new ValidationException("Field ComponentId is empty");
|
||||
if (!ComponentId.IsGuid())
|
||||
throw new ValidationException("The value in the field BlandId is not a unique identifier");
|
||||
throw new ValidationException("The value in the field ComponentId is not a unique identifier");
|
||||
if (Count <= 0)
|
||||
throw new ValidationException("Field Count is less than or equal to 0");
|
||||
}
|
||||
|
||||
@@ -18,10 +18,10 @@ public class FurnitureDataModel(string id, string name, int weight, List<Compone
|
||||
if (!Id.IsGuid())
|
||||
throw new ValidationException("The value in the field Id is not a unique identifier");
|
||||
if (Name.IsEmpty())
|
||||
throw new ValidationException("Field FurnitureId is empty");
|
||||
throw new ValidationException("Field Name is empty");
|
||||
if (Weight <= 0)
|
||||
throw new ValidationException("Field Count is less than or equal to 0");
|
||||
throw new ValidationException("Field Weight is less than or equal to 0");
|
||||
if ((Components?.Count ?? 0) == 0)
|
||||
throw new ValidationException("The sale must include products");
|
||||
throw new ValidationException("The furniture must include Components");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user