public void CleanNullProperties() { if (Instructor != null && Instructor.Id == null) { Instructor = null; } var toRemove = Descriptions.Where(description => description.CourseId == null).ToList(); toRemove.ForEach(d => Descriptions.Remove(d)); }
public void CleanNullProperties() { if (Instructor != null && Instructor.Id == null) { Instructor = null; } var toRemove = Descriptions.Where(description => description.CourseId == null).ToList(); toRemove.ForEach(d => Descriptions.Remove(d)); }