We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a23e5b commit 10fa053Copy full SHA for 10fa053
1 file changed
CountryHelper.cs
@@ -44,13 +44,13 @@ public IEnumerable<Country> GetCountryData()
44
45
46
/// <summary>
47
- /// Returns Country Data by ShortCode
+ /// Returns a single Country Data by ShortCode
48
/// </summary>
49
/// <param name="ShortCode"></param>
50
- /// <returns>IEnumerable<Country></returns>
51
- public IEnumerable<Country> GetCountry(string ShortCode)
+ /// <returns>Country</returns>
+ public Country GetCountryByCode(string ShortCode)
52
{
53
- return _Countries.Where(x => x.CountryShortCode == ShortCode);
+ return _Countries.SingleOrDefault(c => c.CountryShortCode == ShortCode);
54
}
55
56
0 commit comments