Browse Source

Removing update

main
Eric Fleming 7 years ago
parent
commit
eea7f54ded
  1. 1
      src/ApplicationCore/Interfaces/IRepository.cs
  2. 6
      src/Infrastructure/Data/EfRepository.cs

1
src/ApplicationCore/Interfaces/IRepository.cs

@ -6,7 +6,6 @@ namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
public interface IRepository<T> where T : BaseEntity public interface IRepository<T> where T : BaseEntity
{ {
T GetSingleBySpec(ISpecification<T> spec); T GetSingleBySpec(ISpecification<T> spec);
void Update(T entity);
void Delete(T entity); void Delete(T entity);
int Count(ISpecification<T> spec); int Count(ISpecification<T> spec);
} }

6
src/Infrastructure/Data/EfRepository.cs

@ -62,12 +62,6 @@ namespace Microsoft.eShopWeb.Infrastructure.Data
return entity; return entity;
} }
public void Update(T entity)
{
_dbContext.Entry(entity).State = EntityState.Modified;
_dbContext.SaveChanges();
}
public async Task UpdateAsync(T entity) public async Task UpdateAsync(T entity)
{ {

Loading…
Cancel
Save