Created
October 12, 2009 23:26
-
-
Save dvhthomas/208839 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Preference GetDefaultValuePreference(int domain, string name) | |
{ | |
if (domain < 0) throw new ArgumentOutOfRangeException(Resources.InvalidDomainMustBeZeroOrGreater); | |
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException("name"); | |
var preference = _unitOfWork.CurrentSession.Get<Preference>(new Preference { DomainId = domain, ElementId = name }); | |
return preference ?? new Preference { DefaultValue = string.Empty, DomainId = domain, ElementId = name }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment