payment
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
// src/Webshop.Api/Controllers/Admin/AdminPaymentMethodsController.cs
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Webshop.Application.DTOs.Payments; // AdminPaymentMethodDto
|
||||
using Webshop.Application.Services.Admin; // IAdminPaymentMethodService
|
||||
|
||||
namespace Webshop.Api.Controllers.Admin
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/v1/admin/paymentmethods")] // Saubere Route
|
||||
[Authorize(Roles = "Admin")] // Nur Admins
|
||||
public class AdminPaymentMethodsController : ControllerBase
|
||||
{
|
||||
private readonly IAdminPaymentMethodService _adminPaymentMethodService;
|
||||
|
||||
public AdminPaymentMethodsController(IAdminPaymentMethodService adminPaymentMethodService)
|
||||
{
|
||||
_adminPaymentMethodService = adminPaymentMethodService;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<IEnumerable<AdminPaymentMethodDto>>> GetAllPaymentMethods()
|
||||
{
|
||||
var paymentMethods = await _adminPaymentMethodService.GetAllAsync();
|
||||
return Ok(paymentMethods);
|
||||
}
|
||||
|
||||
[HttpGet("{id}")]
|
||||
public async Task<ActionResult<AdminPaymentMethodDto>> GetPaymentMethodById(Guid id)
|
||||
{
|
||||
var paymentMethod = await _adminPaymentMethodService.GetByIdAsync(id);
|
||||
if (paymentMethod == null) return NotFound();
|
||||
return Ok(paymentMethod);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<ActionResult<AdminPaymentMethodDto>> CreatePaymentMethod([FromBody] AdminPaymentMethodDto paymentMethodDto)
|
||||
{
|
||||
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||
var createdPaymentMethod = await _adminPaymentMethodService.CreateAsync(paymentMethodDto);
|
||||
return CreatedAtAction(nameof(GetPaymentMethodById), new { id = createdPaymentMethod.Id }, createdPaymentMethod);
|
||||
}
|
||||
|
||||
[HttpPut("{id}")]
|
||||
public async Task<IActionResult> UpdatePaymentMethod(Guid id, [FromBody] AdminPaymentMethodDto paymentMethodDto)
|
||||
{
|
||||
if (id != paymentMethodDto.Id) return BadRequest();
|
||||
if (!ModelState.IsValid) return BadRequest(ModelState);
|
||||
|
||||
var success = await _adminPaymentMethodService.UpdateAsync(paymentMethodDto);
|
||||
if (!success) return NotFound();
|
||||
return NoContent(); // 204 No Content für erfolgreiches Update
|
||||
}
|
||||
|
||||
[HttpDelete("{id}")]
|
||||
public async Task<IActionResult> DeletePaymentMethod(Guid id)
|
||||
{
|
||||
var success = await _adminPaymentMethodService.DeleteAsync(id);
|
||||
if (!success) return NotFound();
|
||||
return NoContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
30
Webshop.Api/Controllers/Public/PaymentMethodsController.cs
Normal file
30
Webshop.Api/Controllers/Public/PaymentMethodsController.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
// src/Webshop.Api/Controllers/Public/PaymentMethodsController.cs
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Webshop.Application.DTOs.Payments; // PaymentMethodDto
|
||||
using Webshop.Application.Services.Public; // IPaymentMethodService
|
||||
|
||||
namespace Webshop.Api.Controllers.Public
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/v1/public/paymentmethods")] // Saubere Route
|
||||
[AllowAnonymous] // Jeder darf die verfügbaren Zahlungsmethoden sehen
|
||||
public class PaymentMethodsController : ControllerBase
|
||||
{
|
||||
private readonly IPaymentMethodService _paymentMethodService;
|
||||
|
||||
public PaymentMethodsController(IPaymentMethodService paymentMethodService)
|
||||
{
|
||||
_paymentMethodService = paymentMethodService;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<IEnumerable<PaymentMethodDto>>> GetActivePaymentMethods()
|
||||
{
|
||||
var paymentMethods = await _paymentMethodService.GetAllActiveAsync();
|
||||
return Ok(paymentMethods);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,11 +85,13 @@ builder.Services.AddScoped<IAuthService, AuthService>();
|
||||
|
||||
// PUBLIC Services
|
||||
builder.Services.AddScoped<IProductService, ProductService>();
|
||||
builder.Services.AddScoped<IPaymentMethodService, PaymentMethodService>();
|
||||
|
||||
// ADMIN Services
|
||||
builder.Services.AddScoped<IAdminUserService, AdminUserService>();
|
||||
builder.Services.AddScoped<IAdminProductService, AdminProductService>();
|
||||
builder.Services.AddScoped<IAdminSupplierService, AdminSupplierService>();
|
||||
builder.Services.AddScoped<IAdminPaymentMethodService, AdminPaymentMethodService>();
|
||||
|
||||
// CUSTOMER Services (sp<73>ter Implementierungen hinzuf<75>gen)
|
||||
builder.Services.AddScoped<ICustomerService, CustomerService>();
|
||||
|
||||
@@ -16,6 +16,7 @@ using Webshop.Application.DTOs.Orders;
|
||||
using Webshop.Application.DTOs.Discounts;
|
||||
using Webshop.Application.DTOs.Categorys;
|
||||
using Webshop.Api.Controllers.Auth;
|
||||
using Webshop.Domain.Enums;
|
||||
|
||||
namespace Webshop.Api.SwaggerFilters
|
||||
{
|
||||
|
||||
17
Webshop.Application/DTOs/Payments/AdminPaymentMethodDto.cs
Normal file
17
Webshop.Application/DTOs/Payments/AdminPaymentMethodDto.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
// src/Webshop.Application/DTOs/Payments/AdminPaymentMethodDto.cs
|
||||
using System;
|
||||
using Webshop.Domain.Enums;
|
||||
|
||||
namespace Webshop.Application.DTOs.Payments
|
||||
{
|
||||
public class AdminPaymentMethodDto
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public PaymentGatewayType PaymentGatewayType { get; set; }
|
||||
public string? Configuration { get; set; } // Als JSON-String, den der Admin bearbeitet
|
||||
public decimal? ProcessingFee { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
// src/Webshop.Application/DTOs/Payments/PaymentMethodDto.cs
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Webshop.Domain.Enums;
|
||||
|
||||
|
||||
|
||||
@@ -12,8 +13,10 @@ namespace Webshop.Application.DTOs.Payments
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public PaymentGatewayType GatewayType { get; set; }
|
||||
public PaymentGatewayType PaymentGatewayType { get; set; }
|
||||
public decimal? ProcessingFee { get; set; }
|
||||
|
||||
// Wichtig: Wir geben hier nur <20>ffentliche Konfigurationsdaten preis (z.B. IBAN)
|
||||
public object? PublicConfiguration { get; set; }
|
||||
}
|
||||
}
|
||||
100
Webshop.Application/Services/Admin/AdminPaymentMethodService.cs
Normal file
100
Webshop.Application/Services/Admin/AdminPaymentMethodService.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
// src/Webshop.Application/Services/Admin/AdminPaymentMethodService.cs
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq; // Für Select
|
||||
using System.Threading.Tasks;
|
||||
using Webshop.Application.DTOs.Payments; // AdminPaymentMethodDto
|
||||
using Webshop.Domain.Entities; // PaymentMethod
|
||||
using Webshop.Domain.Interfaces; // IPaymentMethodRepository
|
||||
using Webshop.Domain.Enums;
|
||||
|
||||
namespace Webshop.Application.Services.Admin
|
||||
{
|
||||
public class AdminPaymentMethodService : IAdminPaymentMethodService
|
||||
{
|
||||
private readonly IPaymentMethodRepository _paymentMethodRepository;
|
||||
|
||||
public AdminPaymentMethodService(IPaymentMethodRepository paymentMethodRepository)
|
||||
{
|
||||
_paymentMethodRepository = paymentMethodRepository;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<AdminPaymentMethodDto>> GetAllAsync()
|
||||
{
|
||||
var paymentMethods = await _paymentMethodRepository.GetAllAsync();
|
||||
|
||||
return paymentMethods.Select(pm => new AdminPaymentMethodDto
|
||||
{
|
||||
Id = pm.Id,
|
||||
Name = pm.Name,
|
||||
Description = pm.Description,
|
||||
IsActive = pm.IsActive,
|
||||
PaymentGatewayType = pm.PaymentGatewayType,
|
||||
Configuration = pm.Configuration, // Gibt den JSON-String für den Admin zurück
|
||||
ProcessingFee = pm.ProcessingFee
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
public async Task<AdminPaymentMethodDto?> GetByIdAsync(Guid id)
|
||||
{
|
||||
var paymentMethod = await _paymentMethodRepository.GetByIdAsync(id);
|
||||
if (paymentMethod == null) return null;
|
||||
|
||||
return new AdminPaymentMethodDto
|
||||
{
|
||||
Id = paymentMethod.Id,
|
||||
Name = paymentMethod.Name,
|
||||
Description = paymentMethod.Description,
|
||||
IsActive = paymentMethod.IsActive,
|
||||
PaymentGatewayType = paymentMethod.PaymentGatewayType,
|
||||
Configuration = paymentMethod.Configuration,
|
||||
ProcessingFee = paymentMethod.ProcessingFee
|
||||
};
|
||||
}
|
||||
|
||||
public async Task<AdminPaymentMethodDto> CreateAsync(AdminPaymentMethodDto paymentMethodDto)
|
||||
{
|
||||
var newPaymentMethod = new PaymentMethod
|
||||
{
|
||||
Id = Guid.NewGuid(), // API generiert die ID
|
||||
Name = paymentMethodDto.Name,
|
||||
Description = paymentMethodDto.Description,
|
||||
IsActive = paymentMethodDto.IsActive,
|
||||
PaymentGatewayType = paymentMethodDto.PaymentGatewayType,
|
||||
Configuration = paymentMethodDto.Configuration,
|
||||
ProcessingFee = paymentMethodDto.ProcessingFee
|
||||
};
|
||||
|
||||
await _paymentMethodRepository.AddAsync(newPaymentMethod);
|
||||
|
||||
paymentMethodDto.Id = newPaymentMethod.Id; // ID zurückschreiben
|
||||
return paymentMethodDto;
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateAsync(AdminPaymentMethodDto paymentMethodDto)
|
||||
{
|
||||
var existingPaymentMethod = await _paymentMethodRepository.GetByIdAsync(paymentMethodDto.Id);
|
||||
if (existingPaymentMethod == null) return false;
|
||||
|
||||
// Eigenschaften aktualisieren
|
||||
existingPaymentMethod.Name = paymentMethodDto.Name;
|
||||
existingPaymentMethod.Description = paymentMethodDto.Description;
|
||||
existingPaymentMethod.IsActive = paymentMethodDto.IsActive;
|
||||
existingPaymentMethod.PaymentGatewayType = paymentMethodDto.PaymentGatewayType;
|
||||
existingPaymentMethod.Configuration = paymentMethodDto.Configuration;
|
||||
existingPaymentMethod.ProcessingFee = paymentMethodDto.ProcessingFee;
|
||||
|
||||
await _paymentMethodRepository.UpdateAsync(existingPaymentMethod);
|
||||
return true;
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteAsync(Guid id)
|
||||
{
|
||||
var paymentMethod = await _paymentMethodRepository.GetByIdAsync(id);
|
||||
if (paymentMethod == null) return false;
|
||||
|
||||
await _paymentMethodRepository.DeleteAsync(id);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// src/Webshop.Application/Services/Admin/IAdminPaymentMethodService.cs
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Webshop.Application.DTOs.Payments; // Für AdminPaymentMethodDto
|
||||
|
||||
namespace Webshop.Application.Services.Admin
|
||||
{
|
||||
public interface IAdminPaymentMethodService
|
||||
{
|
||||
/// <summary>
|
||||
/// Ruft alle Zahlungsmethoden ab (sowohl aktive als auch inaktive).
|
||||
/// </summary>
|
||||
Task<IEnumerable<AdminPaymentMethodDto>> GetAllAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Ruft eine einzelne Zahlungsmethode anhand ihrer ID ab.
|
||||
/// </summary>
|
||||
Task<AdminPaymentMethodDto?> GetByIdAsync(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// Erstellt eine neue Zahlungsmethode.
|
||||
/// </summary>
|
||||
Task<AdminPaymentMethodDto> CreateAsync(AdminPaymentMethodDto paymentMethodDto);
|
||||
|
||||
/// <summary>
|
||||
/// Aktualisiert eine bestehende Zahlungsmethode.
|
||||
/// </summary>
|
||||
Task<bool> UpdateAsync(AdminPaymentMethodDto paymentMethodDto);
|
||||
|
||||
/// <summary>
|
||||
/// Löscht eine Zahlungsmethode anhand ihrer ID.
|
||||
/// </summary>
|
||||
Task<bool> DeleteAsync(Guid id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// src/Webshop.Application/Services/Public/IPaymentMethodService.cs
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Webshop.Application.DTOs.Payments; // Für PaymentMethodDto
|
||||
|
||||
namespace Webshop.Application.Services.Public
|
||||
{
|
||||
public interface IPaymentMethodService
|
||||
{
|
||||
/// <summary>
|
||||
/// Ruft alle aktiven Zahlungsmethoden ab, die im Checkout für den Kunden sichtbar sein sollen.
|
||||
/// </summary>
|
||||
/// <returns>Eine Liste von PaymentMethodDto mit öffentlichen Konfigurationsdaten.</returns>
|
||||
Task<IEnumerable<PaymentMethodDto>> GetAllActiveAsync();
|
||||
}
|
||||
}
|
||||
67
Webshop.Application/Services/Public/PaymentMethodService.cs
Normal file
67
Webshop.Application/Services/Public/PaymentMethodService.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
// src/Webshop.Application/Services/Public/PaymentMethodService.cs
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json; // Für JSON-Verarbeitung
|
||||
using System.Threading.Tasks;
|
||||
using Webshop.Application.DTOs.Payments;
|
||||
using Webshop.Domain.Enums;
|
||||
using Webshop.Domain.Interfaces;
|
||||
|
||||
|
||||
namespace Webshop.Application.Services.Public
|
||||
{
|
||||
public class PaymentMethodService : IPaymentMethodService
|
||||
{
|
||||
private readonly IPaymentMethodRepository _paymentMethodRepository;
|
||||
|
||||
public PaymentMethodService(IPaymentMethodRepository paymentMethodRepository)
|
||||
{
|
||||
_paymentMethodRepository = paymentMethodRepository;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<PaymentMethodDto>> GetAllActiveAsync()
|
||||
{
|
||||
var paymentMethods = await _paymentMethodRepository.GetAllAsync();
|
||||
|
||||
return paymentMethods
|
||||
.Where(pm => pm.IsActive)
|
||||
.Select(pm => new PaymentMethodDto
|
||||
{
|
||||
Id = pm.Id,
|
||||
Name = pm.Name,
|
||||
Description = pm.Description,
|
||||
PaymentGatewayType = pm.PaymentGatewayType,
|
||||
ProcessingFee = pm.ProcessingFee,
|
||||
PublicConfiguration = GetPublicConfiguration(pm.PaymentGatewayType, pm.Configuration)
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
private object? GetPublicConfiguration(PaymentGatewayType type, string? configJson)
|
||||
{
|
||||
if (string.IsNullOrEmpty(configJson)) return null;
|
||||
|
||||
// Beispiel: Nur für BankTransfer geben wir IBAN etc. preis
|
||||
if (type == PaymentGatewayType.BankTransfer)
|
||||
{
|
||||
var config = JsonSerializer.Deserialize<Dictionary<string, string>>(configJson);
|
||||
if (config != null)
|
||||
{
|
||||
// Filter, um geheime Schlüssel NICHT an das Frontend zu senden
|
||||
return new { IBAN = config.GetValueOrDefault("IBAN"), BIC = config.GetValueOrDefault("BIC"), BankName = config.GetValueOrDefault("BankName") };
|
||||
}
|
||||
}
|
||||
|
||||
// Für Stripe/PayPal geben wir nur den Public Key preis
|
||||
if (type == PaymentGatewayType.Stripe)
|
||||
{
|
||||
var config = JsonSerializer.Deserialize<Dictionary<string, string>>(configJson);
|
||||
if (config != null)
|
||||
{
|
||||
return new { PublicKey = config.GetValueOrDefault("PublicKey") };
|
||||
}
|
||||
}
|
||||
|
||||
return null; // Für andere Typen geben wir keine Konfigurationsdetails preis
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Webshop.Domain.Enums;
|
||||
|
||||
namespace Webshop.Domain.Entities;
|
||||
|
||||
@@ -8,22 +10,21 @@ namespace Webshop.Domain.Entities;
|
||||
/// </summary>
|
||||
public class PaymentMethod
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string Name { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsActive { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
[Required]
|
||||
[MaxLength(50)]
|
||||
public string PaymentGatewayType { get; set; } // "Stripe", "PayPal", etc.
|
||||
public PaymentGatewayType PaymentGatewayType { get; set; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string? Configuration { get; set; }
|
||||
|
||||
public decimal? ProcessingFee { get; set; }
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
public enum PaymentGatewayType
|
||||
// src/Webshop.Domain/Enums/PaymentGatewayType.cs
|
||||
namespace Webshop.Domain.Enums
|
||||
{
|
||||
Stripe,
|
||||
PayPal,
|
||||
Klarna,
|
||||
Manual // z.B. Vorkasse
|
||||
public enum PaymentGatewayType
|
||||
{
|
||||
BankTransfer,
|
||||
PayPal,
|
||||
Stripe,
|
||||
CashOnDelivery,
|
||||
Invoice
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,16 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
// src/Webshop.Domain/Interfaces/IPaymentMethodRepository.cs
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Webshop.Domain.Entities;
|
||||
|
||||
|
||||
namespace Webshop.Domain.Interfaces
|
||||
{
|
||||
public interface IPaymentMethodRepository
|
||||
{
|
||||
// Fügen Sie hier Methodensignaturen hinzu
|
||||
Task<IEnumerable<PaymentMethod>> GetAllAsync();
|
||||
Task<PaymentMethod?> GetByIdAsync(Guid id);
|
||||
Task AddAsync(PaymentMethod paymentMethod);
|
||||
Task UpdateAsync(PaymentMethod paymentMethod);
|
||||
Task DeleteAsync(Guid id);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
// src/Webshop.Infrastructure/Repositories/PaymentMethodRepository.cs
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Webshop.Domain.Entities;
|
||||
using Webshop.Domain.Interfaces;
|
||||
@@ -18,12 +18,10 @@ namespace Webshop.Infrastructure.Repositories
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// Fügen Sie hier Repository-Methoden hinzu
|
||||
// Beispiel:
|
||||
// public async Task<IEnumerable<T>> GetAllAsync() { return await _context.Set<T>().ToListAsync(); }
|
||||
// public async Task<T?> GetByIdAsync(Guid id) { return await _context.Set<T>().FindAsync(id); }
|
||||
// public async Task AddAsync(T entity) { _context.Set<T>().Add(entity); await _context.SaveChangesAsync(); }
|
||||
// public async Task UpdateAsync(T entity) { _context.Set<T>().Update(entity); await _context.SaveChangesAsync(); }
|
||||
// public async Task DeleteAsync(Guid id) { var entity = await _context.Set<T>().FindAsync(id); if (entity != null) { _context.Set<T>().Remove(entity); await _context.SaveChangesAsync(); } }
|
||||
public async Task<IEnumerable<PaymentMethod>> GetAllAsync() => await _context.PaymentMethods.ToListAsync();
|
||||
public async Task<PaymentMethod?> GetByIdAsync(Guid id) => await _context.PaymentMethods.FindAsync(id);
|
||||
public async Task AddAsync(PaymentMethod paymentMethod) { _context.PaymentMethods.Add(paymentMethod); await _context.SaveChangesAsync(); }
|
||||
public async Task UpdateAsync(PaymentMethod paymentMethod) { _context.PaymentMethods.Update(paymentMethod); await _context.SaveChangesAsync(); }
|
||||
public async Task DeleteAsync(Guid id) { var entity = await _context.PaymentMethods.FindAsync(id); if (entity != null) { _context.PaymentMethods.Remove(entity); await _context.SaveChangesAsync(); } }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user