public async Task <IActionResult> DeleteCouponUser(int couponID) { Guid userID = new Guid(User.FindFirst(ClaimTypes.NameIdentifier)?.Value); var couponUserEntity = await couponRepository.GetCouponUserAsync(couponID, userID); if (couponUserEntity == null) { return(NotFound()); } couponRepository.DeleteCouponUser(couponUserEntity); await couponRepository.SaveAsync(); return(NoContent()); }