예제 #1
0
 public int CreateProduct(ProductCreateInput input)
 {
     input.Name = "";
     var product = ObjectMapper.Map<Product>(input);
     return _productRepository.InsertAndGetId(product);
 }
예제 #2
0
 public void CreateProductAndRollback(ProductCreateInput input)
 {
     _productRepository.Insert(ObjectMapper.Map<Product>(input));
     CurrentUnitOfWork.SaveChanges();
     throw new UserFriendlyException("This exception is thrown to rollback the transaction!");
 }
 public virtual int CreateProduct(ProductCreateInput input)
 {
     return _productRepository.InsertAndGetId(ObjectMapper.Map<Product>(input));
 }