public void DeleteSettlement(int id) { var settlement = settlementRepository.Query().FirstOrDefault(s => s.Id == id); if (settlement == null) { return; } settlementRepository.Delete(settlement); settlementRepository.Commit(); }