Browse Source

Remove Delete

main
Eric Fleming 7 years ago
parent
commit
427961095a
  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
{
T GetSingleBySpec(ISpecification<T> spec);
void Delete(T entity);
int Count(ISpecification<T> spec);
}
}

6
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<T>().Remove(entity);
_dbContext.SaveChanges();
}
public async Task DeleteAsync(T entity)
{

Loading…
Cancel
Save