Skip to content

Instantly share code, notes, and snippets.

@eldewall
Created August 25, 2011 12:16
Show Gist options
  • Select an option

  • Save eldewall/1170524 to your computer and use it in GitHub Desktop.

Select an option

Save eldewall/1170524 to your computer and use it in GitHub Desktop.
public Customer CurrentCustomer {
get {
if (_currentCustomer == null) {
_currentCustomer = CustomerFromSession();
if (_currentCustomer == null) {
_currentCustomer = CurrentUser.Customers.First();
PersistCustomer(_currentCustomer);
}
}
return _currentCustomer;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment