Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Service / PCC.Services
diff options
context:
space:
mode:
1 files changed, 7 insertions, 0 deletions
-rw-r--r--src/Service/PCC.Services/PartsService.cs7
diff --git a/src/Service/PCC.Services/PartsService.cs b/src/Service/PCC.Services/PartsService.cs
index 4c48ca2..c902131 100644
--- a/src/Service/PCC.Services/PartsService.cs
+++ b/src/Service/PCC.Services/PartsService.cs
@@ -19,6 +19,13 @@ namespace PCC.Services
public async Task<bool> CreateProcessorPart(ProcessorServiceModel processorServiceModel)
{
+ if (string.IsNullOrEmpty(processorServiceModel.Brand))
+ {
+ // TODO: Move message to constant
+ // Refactor this
+ throw new ArgumentException("Processor Brand cannot be null or empty!");
+ }
+
Processor processorEntity = processorServiceModel.To<Processor>();
processorEntity.Id = Guid.NewGuid().ToString();