public static void DeleteEntry(PriorityEntity entity, BridgeCareContext db) { if (entity.PRIORITYFUNDS.Any()) { entity.PRIORITYFUNDS.ToList() .ForEach(pfEntity => PriorityFundEntity.DeleteEntry(pfEntity, db)); } db.Entry(entity).State = EntityState.Deleted; }
public static void DeleteEntry(PriorityFundEntity entity, BridgeCareContext db) { db.Entry(entity).State = EntityState.Deleted; }