public static void DeleteEntry(SplitTreatmentEntity entity, BridgeCareContext db) { if (entity.SPLIT_TREATMENT_LIMITS.Any()) { entity.SPLIT_TREATMENT_LIMITS.ToList() .ForEach(stl => SplitTreatmentLimitEntity.DeleteEntry(stl, db)); } db.Entry(entity).State = EntityState.Deleted; }
public static void DeleteEntry(SplitTreatmentLimitEntity entity, BridgeCareContext db) { db.Entry(entity).State = EntityState.Deleted; }