public virtual void AddDescription(Work work, string workDesc) { WorkDescription line = workDescriptions .Where(p => p.WorkDescriptionID == work.WorkID) .FirstOrDefault(); if (line == null) { workDescriptions.Add(new WorkDescription { Work = work, WorkDescriptionText = workDesc }); } }
public virtual void RemoveDescription(WorkDescription work) => workDescriptions.RemoveAll(l => l.WorkDescriptionID == work.WorkDescriptionID);