public bool Create(Product entity)
 {
     if (string.IsNullOrEmpty(ValidatorTool.errorMessage))
     {
         _productDal.Create(entity);
         return(true);
     }
     return(false);
 }
Beispiel #2
0
 public bool Create(Product entity)
 {
     if (Validate(entity))
     {
         _productDal.Create(entity);
         return(true);
     }
     return(false);
 }
 public bool Create(Product entity)
 {
     if (Validate(entity))
     {
         _productDal.Create(entity); //kayıt oluşturur
         return(true);
     }
     return(false);
 }
Beispiel #4
0
 //EfCoreProductDal _productDal = new EfCoreProductDal();
 public bool Create(Product entity)
 {
     if (Validate(entity))
     {
         _productDal.Create(entity);
         return(true);
     }
     return(false);
     //throw new NotImplementedException();
 }
Beispiel #5
0
        public void Save(Product product)
        {
            if (product.ShoudBeCreated)
            {
                _productDal.Create(product);
            }

            else
            {
                _productDal.Update(product);
            }
        }
        public IResult Add(Product product)
        {
            // business codes
            IResult result = BusinessRules.Run(CheckIfProductNameOfProductCorrect(product.ProductName),
                                               CheckIfProductCountOfCategoryCorrect(product.CategoryId),
                                               CheckIfCategoiesCountCorrect());

            if (result != null)
            {
                return(result);
            }

            _productDal.Create(product);
            return(new SuccessResult(Messages.ProductAdded));
        }
 public void Create(Product entity)
 {
     _productDal.Create(entity);
 }
Beispiel #8
0
 public void Create(Product entity)
 {
     _productService.Create(entity);
 }
Beispiel #9
0
 public int Create(Products p)
 {
     return(_productDal.Create(p));
 }
Beispiel #10
0
 public async Task Add(Product product)
 {
     await _productDal.Create(product);
 }
Beispiel #11
0
 public void Create(Product product)
 {
     _productDal.Create(product);
 }
 public void Create(Product Entity)
 {
     _productDal.Create(Entity);
 }