From 427961095ac0861e98219b3452ee6722dd51d64e Mon Sep 17 00:00:00 2001 From: Eric Fleming Date: Fri, 1 Mar 2019 22:11:19 -0500 Subject: [PATCH] Remove Delete --- src/ApplicationCore/Interfaces/IRepository.cs | 1 - src/Infrastructure/Data/EfRepository.cs | 6 ------ 2 files changed, 7 deletions(-) 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) {