public bool DeleteSelectedPMVendorCustomerLocations(PMCustomerLOcations SelectedCustomerLocations) { using (FacilitiesEntities db = new FacilitiesEntities()) { try { foreach (var data in SelectedCustomerLocations.SelectedCustomerLocations) { var PMVendorCustomerLocations = db.PMVendorCustomerLocations.Where(a => a.PMVendorCustomerLocationId == data).ToList(); db.PMVendorCustomerLocations.RemoveRange(PMVendorCustomerLocations); } db.SaveChanges(); } catch (Exception ex) { throw (ex); } return(true); } }
public bool DeleteSelectedPMVendorCustomerLocations(PMCustomerLOcations SelectedCustomerLocations) { return(repository.DeleteSelectedPMVendorCustomerLocations(SelectedCustomerLocations)); }