public async Task DeleteAsync(string code) { using (var dbContext = _dbContextScopeFactory.Create()) { var systemConfig = await _systemConfigRepository .FindAsync(p => p.Code.Equals(code, StringComparison.OrdinalIgnoreCase)); _systemConfigRepository.Delete(systemConfig); dbContext.SaveChanges(); await GetListAsync(true); } }
public void Delete(int id) { _systemConfigRepository.Delete(id); }