// Auto-generiert von CreateWebshopFiles.ps1 using Microsoft.EntityFrameworkCore; using Webshop.Domain.Entities; using Webshop.Domain.Interfaces; using Webshop.Infrastructure.Data; using System; using System.Collections.Generic; using System.Threading.Tasks; namespace Webshop.Infrastructure.Repositories { public class ShippingMethodRepository : IShippingMethodRepository { private readonly ApplicationDbContext _context; public ShippingMethodRepository(ApplicationDbContext context) { _context = context; } // Fügen Sie hier Repository-Methoden hinzu // Beispiel: // public async Task> GetAllAsync() { return await _context.Set().ToListAsync(); } // public async Task GetByIdAsync(Guid id) { return await _context.Set().FindAsync(id); } // public async Task AddAsync(T entity) { _context.Set().Add(entity); await _context.SaveChangesAsync(); } // public async Task UpdateAsync(T entity) { _context.Set().Update(entity); await _context.SaveChangesAsync(); } // public async Task DeleteAsync(Guid id) { var entity = await _context.Set().FindAsync(id); if (entity != null) { _context.Set().Remove(entity); await _context.SaveChangesAsync(); } } } }