Last active
January 20, 2016 18:44
-
-
Save JoseGonzalez321/764aeb33a18a29de446b 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 GetTopLevel(DateTime valueDate, string branch) | |
{ | |
var parameters = SetupStoredProcParameters(Level.Top, valueDate, branch); | |
const string storedProc = "GetTopLevel"; | |
var result = storedProc.ToDataTable(dbConnection, parameters); | |
return result; | |
} | |
public DataTable GetFirstLevel(DateTime valuDate, string branch, string levelName) | |
{ | |
var parameters = SetupStoredProcParameters(Level.Top, valueDate, branch, levelName); | |
const string storedProc = "GetLevelOne"; | |
var result = storedProc.ToDataTable(dbConnection, parameters); | |
return result; | |
} | |
public DataTable GetSecondLevel(DateTime valueDate, | |
string branch, | |
string levelName, | |
string subLevelName) | |
{ | |
var parameters = SetupStoredProcParameters(Level.Top, valueDate, branch, levelName, subLevel); | |
const string storedProc = "GetLevelTwo"; | |
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