/// <summary> /// Adds the specified list. /// </summary> /// <param name="list">The list.</param> public static void Add(List<ResumeField> list) { foreach (var item in list.SelectMany(item => item.Theme)) { if (item == null || item.ResumeId < 1 || item.ThemeId < 1 || item.SkillId < 1) throw new CustomException("Invalid part of resume","Add operation was broken by invalid argument"); ResumeTheme.Add(item); } Context.SaveChanges(); }