コード例 #1
0
        public override async Task <DeleteVoucherResponse> DeleteDiscount(DeleteDiscountRequest request, ServerCallContext context)
        {
            var isVoucherDeleted = await _discountRepository.DeleteVoucher(request.ProductName);

            return(new DeleteVoucherResponse
            {
                Success = isVoucherDeleted
            });
        }
コード例 #2
0
 public async Task <ActionResult <bool> > Delete(string productName)
 {
     return(Ok(await _repository.DeleteVoucher(productName)));
 }