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);
            }
        }
示例#2
0
 public void Delete(int id)
 {
     _systemConfigRepository.Delete(id);
 }