Skip to content

Instantly share code, notes, and snippets.

@adamhopkinson
Last active August 10, 2017 12:43
Show Gist options
  • Save adamhopkinson/8036875 to your computer and use it in GitHub Desktop.
Save adamhopkinson/8036875 to your computer and use it in GitHub Desktop.
C# Globablisation - getting the market instance from the visitors' origin country (via GeoIP)
var market = MarketInfo.Markets.SingleOrDefault(m => m.Code == Visitor.CountryCode);
if (market == null)
market = Visitor.Market;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment