public Card GetCardByExternalId(string externalId) { if (IsPrefixEnabled && externalId.StartsWith(Prefix)) { externalId = externalId.TrimStart(Prefix.ToCharArray()); } CardView cardView = Lanes.SelectMany(lane => lane.Cards).FirstOrDefault(c => c.ExternalCardID == externalId); if (cardView == null) { cardView = Backlog.SelectMany(lane => lane.Cards).FirstOrDefault(c => c.ExternalCardID == externalId); } if (cardView == null) { cardView = Archive.SelectMany(lane => lane.Cards).FirstOrDefault(c => c.ExternalCardID == externalId); } return(cardView == null ? null : cardView.ToCard()); }
public Card GetCardById(long cardId) { CardView cardView = GetCardViewById(cardId); return(cardView == null ? null : cardView.ToCard()); }