Пример #1
0
        public bool RemoveAssociatedPart(int partNo)
        {
            var part = AssociatedParts.FirstOrDefault(x => x.PartId == partNo);

            if (part != null)
            {
                AssociatedParts.Remove(part);
            }
            return(part != null);
        }
Пример #2
0
 public Part LookupAssociatedPart(int partNo)
 {
     return(AssociatedParts.FirstOrDefault(x => x.PartId == partNo));
 }
Пример #3
0
 public Part LookupAssociatedPart(int id)
 {
     return(AssociatedParts.FirstOrDefault(part => part.PartID == id));
 }