From eea7f54ded085f0455ff5fc487b02e037d9f5851 Mon Sep 17 00:00:00 2001 From: Eric Fleming Date: Fri, 1 Mar 2019 22:10:32 -0500 Subject: [PATCH] Removing update --- 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 9f02c99..0c73fa5 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 Update(T entity); void Delete(T entity); int Count(ISpecification spec); } diff --git a/src/Infrastructure/Data/EfRepository.cs b/src/Infrastructure/Data/EfRepository.cs index e81a5d1..be963b5 100644 --- a/src/Infrastructure/Data/EfRepository.cs +++ b/src/Infrastructure/Data/EfRepository.cs @@ -62,12 +62,6 @@ namespace Microsoft.eShopWeb.Infrastructure.Data return entity; } - - public void Update(T entity) - { - _dbContext.Entry(entity).State = EntityState.Modified; - _dbContext.SaveChanges(); - } public async Task UpdateAsync(T entity) {