public Maybe <ItInterfaceExhibit> ChangeExhibitingSystem(Maybe <ItSystem> system) { if (system.IsNone) { ExhibitedBy = null; } else { var newSystem = system.Value; var changed = ExhibitedBy == null || (newSystem.Id != ExhibitedBy.ItSystem.Id); if (changed) { ExhibitedBy = new ItInterfaceExhibit { ItInterface = this, ItSystem = newSystem }; } } return(ExhibitedBy); }
public bool TryGetInterfaceExhibit(out ItInterfaceExhibit interfaceExhibit, int interfaceId) { interfaceExhibit = ItInterfaceExhibits.FirstOrDefault(i => i.ItInterface.Id == interfaceId); return(interfaceExhibit != null); }