示例#1
0
        public int AddGalardon(GalardonProductInput input)
        {
            if (input.ProductId == null)
            {
                throw new UserFriendlyException("Producto no definido");
            }
            var galardon = ProductCertification.Create(input.Id, input.ProductId);

            return(_productManager.AddGalardon(galardon));
        }
示例#2
0
        public void AddCertificationToProduct(Guid productId, int id)
        {
            var coincidence = _productCertificationRepository.GetAllList(a => a.CertId == id && a.ProductId == productId);

            if (coincidence.Any())
            {
                return;
            }
            var relation = ProductCertification.Create(id, productId);

            _productCertificationRepository.InsertOrUpdateAndGetId(relation);
        }