Last active
January 20, 2016 18:45
-
-
Save JoseGonzalez321/e17f7242cf0c19d6dffc to your computer and use it in GitHub Desktop.
Gist for blog post: http://www.mindbodysouldeveloper.com/2016/01/27/c-sharp-how-to-replace-dictionary-with-factory-method/
This file contains 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 DataTable GetSecondLevel(DateTime valueDate, | |
string branch, | |
string levelName, | |
string subLevelName) | |
{ | |
const string storedProc = "GetLevelTwo"; | |
var parameters = new Dictionary<string, object> | |
{ | |
{ParamConstant.ValueDate, valueDate}, | |
{ParamConstant.Branch, branch}, | |
{ParamConstant.LevelName, levelName}, | |
{ParamConstant.SubLevelName, subLevelName}, | |
}; | |
var result = storedProc.ToDataTable(dbConnection, parameters); | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment