diff --git a/src/ApplicationCore/Interfaces/IRepository.cs b/src/ApplicationCore/Interfaces/IRepository.cs index 0c73fa5..8d5c38e 100644 --- a/src/ApplicationCore/Interfaces/IRepository.cs +++ b/src/ApplicationCore/Interfaces/IRepository.cs @@ -6,7 +6,6 @@ namespace Microsoft.eShopWeb.ApplicationCore.Interfaces public interface IRepository where T : BaseEntity { T GetSingleBySpec(ISpecification spec); - void Delete(T entity); int Count(ISpecification spec); } } diff --git a/src/Infrastructure/Data/EfRepository.cs b/src/Infrastructure/Data/EfRepository.cs index be963b5..b5afbee 100644 --- a/src/Infrastructure/Data/EfRepository.cs +++ b/src/Infrastructure/Data/EfRepository.cs @@ -68,12 +68,6 @@ namespace Microsoft.eShopWeb.Infrastructure.Data _dbContext.Entry(entity).State = EntityState.Modified; await _dbContext.SaveChangesAsync(); } - - public void Delete(T entity) - { - _dbContext.Set().Remove(entity); - _dbContext.SaveChanges(); - } public async Task DeleteAsync(T entity) {