Ejemplo n.º 1
0
        public async Task UpdateMerchantVoucher(MerchantVoucher voucher, IFormFile image)
        {
            try
            {
                if (image != null)
                {
                    _azureStorageService.DeleteBlobData(voucher.Image);
                    voucher.Image = await UploadFile(image);
                }

                _context.Update(voucher);
                await _context.SaveChangesAsync();
            }
            catch (Exception e)
            {
                Log.Error($"Error updateing merchant voucher with id: {voucher.Id}, {e}");
            }
        }