public int DeleteManyTown(List <int> townIds) { try { int result = 0; foreach (int townId in townIds) { result += townRepository.DeleteTown(townId); result += villageRepository.DeleteVillageByTownId(townId); } return(result); } catch (Exception ex) { throw ex; } }
public async Task DeleteTown(int townId) { await _townRepository.DeleteTown(townId); }