コード例 #1
0
        public async Task UpdateProduct(CreateOrUpdateProductInput input)
        {
            Debug.Assert(input.Id != null, "input.Product.Id should be set.");

            //var product = await _productRepository.GetAsync(input.Id.Value);
            var product = input.MapTo <Product>();
            await _productRepository.UpdateAsync(product);
        }
コード例 #2
0
        //[AbpAuthorize("Administration.ProductManagement.CreateProduct")]
        /// <summary>
        /// 2.增加
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task CreateProduct(CreateOrUpdateProductInput input)
        {
            var product = input.MapTo <Product>();

            await _productRepository.InsertAsync(product);
        }