public void BatchDelete(int[] inputs) { foreach (var input in inputs) { var entity = _factoryRepository.Get(input); _factoryManager.Delete(entity); } }
public void AffiliateDelete(City entity) { var query = _factoryManager.GetAll().Where(f => f.CityId == entity.Id); ArrayList list = new ArrayList(query.Count()); if (query.Any()) { foreach (var factory in query) { list.Add((Factory)factory); } } foreach (var factory in list) { _factoryManager.Delete((Factory)factory); } Delete(entity); }