public bool RemoveAssociatedPart(int partNo) { var part = AssociatedParts.FirstOrDefault(x => x.PartId == partNo); if (part != null) { AssociatedParts.Remove(part); } return(part != null); }
public Part LookupAssociatedPart(int partNo) { return(AssociatedParts.FirstOrDefault(x => x.PartId == partNo)); }
public Part LookupAssociatedPart(int id) { return(AssociatedParts.FirstOrDefault(part => part.PartID == id)); }