//DeleteBySubjectId public static void DeleteItemsSubjectBySubjectId(int subjectId) { List <ItemsSubject> lst = new List <ItemsSubject>(ItemsSubjectDL.GetAllItemsSubject()); if (lst != null && lst.Count != 0) { ItemsSubjectDL.DeleteById(lst.Where(it => it.SubjectId.Equals(subjectId)).FirstOrDefault()); } }
//DeleteByItemId public static void DeleteItemsSubjectByItemId(int ItemId) { List <ItemsSubject> lst = new List <ItemsSubject>(ItemsSubjectDL.GetAllItemsSubject()); if (lst.Count > 0) { ItemsSubjectDL.DeleteById(lst.Where(it => it.ItemId.Equals(ItemId)).FirstOrDefault()); } }