예제 #1
0
 private void ValidateAddItemProduct(ProductDto product)
 {
     if (product == null)
     {
         throw new Exception(ResourceConstantsExceptions.NotFound("Product"));
     }
 }
예제 #2
0
 private void ValidateAddItemCart(CartDto cart)
 {
     if (cart == null)
     {
         throw new Exception(ResourceConstantsExceptions.NotFound("Cart"));
     }
 }
예제 #3
0
 private void ValidateAddItemQuantity(int quantity)
 {
     if (quantity <= 0)
     {
         throw new Exception(ResourceConstantsExceptions.NotValid("Quantity"));
     }
 }
예제 #4
0
 private void ValidateGet(string title)
 {
     if (title.Length < 1)
     {
         throw new Exception(ResourceConstantsExceptions.NotValid("Name"));
     }
 }
예제 #5
0
 private void ValidateGetCategory(CategoryDto category)
 {
     if (category == null)
     {
         throw new Exception(ResourceConstantsExceptions.NotFound("Category"));
     }
 }
예제 #6
0
 private void ValidateGetPrice(double price)
 {
     if (price <= 0)
     {
         throw new Exception(ResourceConstantsExceptions.NotValid("Price"));
     }
 }