-
Notifications
You must be signed in to change notification settings - Fork 1
/
02_Generate_CSharpClasses.ps1
40 lines (29 loc) · 1.22 KB
/
02_Generate_CSharpClasses.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# Like EntityFramework, goal is to generate C# classes for each of the tables in the database
#
##-----------------------------------------------------------------------
##
#******************* Dot-Source Functions *****************************
##
##-----------------------------------------------------------------------
#My Default location = C:\1Presentations\Practical_PowerShell\OpenSource
# Please input the location where you have the open-source files
# on your computer after you download the demos!
$OpenSourcePS1FilesLocation = Read-Host -Prompt 'Input the location of the open-source ps1 files for demo'
if ((Test-Path -LiteralPath $OpenSourcePS1FilesLocation) -eq $false)
{
throw 'Path does not exist! Enter a valid path'
}
else
{
"About to dot-source from $OpenSourcePS1FilesLocation"
}
. $OpenSourcePS1FilesLocation\Invoke-SQLCmd2.ps1
. $OpenSourcePS1FilesLocation\Out-DataTable.ps1
. $OpenSourcePS1FilesLocation\Add-SQLTable.ps1
. $OpenSourcePS1FilesLocation\Write-DataTable.ps1
. $OpenSourcePS1FilesLocation\Test-SQLTableExists.ps1
#. $OpenSourcePS1FilesLocation\Collect-SQLDataToTable.ps1
#. $OpenSourcePS1FilesLocation\Collect-SQLListDataToTable.ps1
#. $OpenSourcePS1FilesLocation\Invoke-Async.ps1