From 2d4af091aa9f0e50afd2ac122d0e292a3e6d51e1 Mon Sep 17 00:00:00 2001 From: Chomp Date: Wed, 12 Jan 2022 15:04:42 +0000 Subject: [PATCH] Add helper function --- AssortValidator.Common/Helpers/TraderHelper.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AssortValidator.Common/Helpers/TraderHelper.cs b/AssortValidator.Common/Helpers/TraderHelper.cs index d3b0bab..11ceab2 100644 --- a/AssortValidator.Common/Helpers/TraderHelper.cs +++ b/AssortValidator.Common/Helpers/TraderHelper.cs @@ -1,4 +1,5 @@ using AssortValidator.Common.Models; +using System; using System.Collections.Generic; namespace AssortValidator.Common.Helpers @@ -40,5 +41,10 @@ namespace AssortValidator.Common.Helpers return returnType; } + + public static string GetTraderIdByName(Trader key) + { + return _traders.GetValueOrDefault(key, string.Empty); + } } }