diff --git a/.github/workflows/gitleaks.yaml b/.github/workflows/gitleaks.yaml index c115f77..f20f0ad 100644 --- a/.github/workflows/gitleaks.yaml +++ b/.github/workflows/gitleaks.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4.2.2 - name: Install the gitleaks run: wget https://github.com/zricethezav/gitleaks/releases/download/v8.15.2/gitleaks_8.15.2_linux_x64.tar.gz shell: pwsh @@ -21,18 +21,24 @@ jobs: continue-on-error: true - name: Setup NuGet.exe if: steps.gitleaks.outcome != 'success' - uses: nuget/setup-nuget@v1 + uses: nuget/setup-nuget@v2 with: nuget-version: latest - - name: Install the dotnet + - name: Install Mono if: steps.gitleaks.outcome != 'success' - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '3.1.x' + run: | + sudo apt update + sudo apt install -y mono-complete + - name: Install the dotnet SDK to a custom directory + if: steps.gitleaks.outcome != 'success' + run: | + mkdir -p $GITHUB_WORKSPACE/dotnet + curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --install-dir $GITHUB_WORKSPACE/dotnet --channel 6.0 - name: Install the report tool packages if: steps.gitleaks.outcome != 'success' run: | + export PATH=$GITHUB_WORKSPACE/dotnet:$PATH nuget install "Syncfusion.Email" -source ${{ secrets.NexusFeedLink }} -ExcludeVersion - dir $GITHUB_WORKSPACE/Syncfusion.Email/lib/netcoreapp3.1 - dotnet $GITHUB_WORKSPACE/Syncfusion.Email/lib/netcoreapp3.1/GitleaksReportMail.dll ${{ secrets.CITEAMCREDENTIALS }} "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" ${{ secrets.ORGANIZATIONNAME }} - exit 1 \ No newline at end of file + dir $GITHUB_WORKSPACE/Syncfusion.Email/lib/net6.0 + dotnet $GITHUB_WORKSPACE/Syncfusion.Email/lib/net6.0/GitleaksReportMail.dll ${{ secrets.CITEAMCREDENTIALS }} "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" ${{ secrets.ORGANIZATIONNAME }} + exit 1 diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/DesignTimeBuild/.dtbcache.v2 b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..afcb21a Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/DesignTimeBuild/.dtbcache.v2 differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/0b557bc6-1b0f-40f1-820e-eb579500741e.vsidx b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/0b557bc6-1b0f-40f1-820e-eb579500741e.vsidx new file mode 100644 index 0000000..20ffa22 Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/0b557bc6-1b0f-40f1-820e-eb579500741e.vsidx differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/44ce44de-7300-444c-b0b3-389cb8820a2c.vsidx b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/44ce44de-7300-444c-b0b3-389cb8820a2c.vsidx new file mode 100644 index 0000000..2415530 Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/44ce44de-7300-444c-b0b3-389cb8820a2c.vsidx differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/4895c5a7-758c-440f-88a7-becef40cd0b2.vsidx b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/4895c5a7-758c-440f-88a7-becef40cd0b2.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/4895c5a7-758c-440f-88a7-becef40cd0b2.vsidx differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/6f8ff287-022a-449f-92dc-b2ea95605012.vsidx b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/6f8ff287-022a-449f-92dc-b2ea95605012.vsidx new file mode 100644 index 0000000..67966f6 Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/6f8ff287-022a-449f-92dc-b2ea95605012.vsidx differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/a19d2c02-b350-4f06-9ce7-daa1b0821c98.vsidx b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/a19d2c02-b350-4f06-9ce7-daa1b0821c98.vsidx new file mode 100644 index 0000000..62c1b22 Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/a19d2c02-b350-4f06-9ce7-daa1b0821c98.vsidx differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/config/applicationhost.config b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/config/applicationhost.config new file mode 100644 index 0000000..0d88f0d --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/config/applicationhost.config @@ -0,0 +1,1016 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.futdcache.v2 b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.futdcache.v2 new file mode 100644 index 0000000..e022ede Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.futdcache.v2 differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.suo b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.suo new file mode 100644 index 0000000..4c113e1 Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.suo differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.backup.json b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..fdb1697 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.backup.json @@ -0,0 +1,190 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\samples\\typescript\\database_samples\\custom-adaptor\\grid_mssql\\grid_mssql\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\samples\\typescript\\database_samples\\custom-adaptor\\grid_mssql\\grid_mssql\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\samples\\typescript\\database_samples\\custom-adaptor\\grid_mssql\\grid_mssql\\src\\customadaptor.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\customadaptor.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\samples\\typescript\\database_samples\\custom-adaptor\\grid_mssql\\grid_mssql\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\samples\\typescript\\database_samples\\custom-adaptor\\grid_mssql\\grid_mssql\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\samples\\typescript\\database_samples\\custom-adaptor\\grid_mssql\\grid_mssql\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\samples\\typescript\\database_samples\\custom-adaptor\\grid_mssql\\grid_mssql\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\samples\\typescript\\database_samples\\custom-adaptor\\grid_mssql\\grid_mssql\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\samples\\typescript\\database_samples\\custom-adaptor\\grid_mssql\\grid_mssql\\grid_mssql.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\grid_mssql.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\samples\\typescript\\database_samples\\custom-adaptor\\grid_mssql\\grid_mssql\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\Program.cs", + "RelativeDocumentMoniker": "Grid_MSSQL\\Program.cs", + "ToolTip": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\Program.cs", + "RelativeToolTip": "Grid_MSSQL\\Program.cs", + "ViewState": "AgIAAAkAAAAAAAAAAAAAAAkAAAAaAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-15T04:05:32.484Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "launchSettings.json", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\Properties\\launchSettings.json", + "RelativeDocumentMoniker": "Grid_MSSQL\\Properties\\launchSettings.json", + "ToolTip": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\Properties\\launchSettings.json", + "RelativeToolTip": "Grid_MSSQL\\Properties\\launchSettings.json", + "ViewState": "AgIAAAsAAAAAAAAAAAAkwBUAAAAOAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-15T03:45:39.625Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "package.json", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\package.json", + "RelativeDocumentMoniker": "Grid_MSSQL\\package.json", + "ToolTip": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\package.json", + "RelativeToolTip": "Grid_MSSQL\\package.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAB0AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-15T03:30:00.998Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "webpack.config.js", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\webpack.config.js", + "RelativeDocumentMoniker": "Grid_MSSQL\\webpack.config.js", + "ToolTip": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\webpack.config.js", + "RelativeToolTip": "Grid_MSSQL\\webpack.config.js", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACQAAAACAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|", + "WhenOpened": "2025-04-15T03:24:40.728Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "CustomAdaptor.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\CustomAdaptor.ts", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\CustomAdaptor.ts", + "ToolTip": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\CustomAdaptor.ts", + "RelativeToolTip": "Grid_MSSQL\\src\\CustomAdaptor.ts", + "ViewState": "AgIAAAAAAAAAAAAAAAAAADwAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-15T03:20:18.582Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "GridController.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\Controllers\\GridController.cs", + "RelativeDocumentMoniker": "Grid_MSSQL\\Controllers\\GridController.cs", + "ToolTip": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\Controllers\\GridController.cs", + "RelativeToolTip": "Grid_MSSQL\\Controllers\\GridController.cs", + "ViewState": "AgIAAAsAAAAAAAAAAAAAwAsAAAD0AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-14T13:56:50.064Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "tsconfig.json", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\tsconfig.json", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\tsconfig.json", + "ToolTip": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\tsconfig.json", + "RelativeToolTip": "Grid_MSSQL\\src\\tsconfig.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-14T13:56:30.176Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "index.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.ts", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\index.ts", + "ToolTip": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.ts", + "RelativeToolTip": "Grid_MSSQL\\src\\index.ts", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAEAAAAUAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-14T04:22:45.268Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "index.html", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\index.html", + "ToolTip": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeToolTip": "Grid_MSSQL\\src\\index.html", + "ViewState": "AgIAAAsAAAAAAAAAAAAuwB4AAAAHAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|", + "WhenOpened": "2025-04-14T04:22:42.151Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "Grid_MSSQL.csproj", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\Grid_MSSQL.csproj", + "RelativeDocumentMoniker": "Grid_MSSQL\\Grid_MSSQL.csproj", + "ToolTip": "D:\\Component\\EJ2\\Samples\\TypeScript\\DataBase_Samples\\Custom-Adaptor\\Grid_MSSQL\\Grid_MSSQL\\Grid_MSSQL.csproj", + "RelativeToolTip": "Grid_MSSQL\\Grid_MSSQL.csproj", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", + "WhenOpened": "2025-04-07T10:02:17.392Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.json b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.json new file mode 100644 index 0000000..ed6f098 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.json @@ -0,0 +1,87 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using CustomAdaptor\\Grid_MSSQL\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using customadaptor\\grid_mssql\\grid_mssql\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using customadaptor\\grid_mssql\\grid_mssql\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using customadaptor\\grid_mssql\\grid_mssql\\src\\customadaptor.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\customadaptor.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using customadaptor\\grid_mssql\\grid_mssql\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{917BECDF-887A-46C0-9B59-A64DF4698A2F}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 2, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "CustomAdaptor.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using CustomAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\CustomAdaptor.ts", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\CustomAdaptor.ts", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using CustomAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\CustomAdaptor.ts", + "RelativeToolTip": "Grid_MSSQL\\src\\CustomAdaptor.ts", + "ViewState": "AgIAAAAAAAAAAAAAAAAAADwAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-15T03:20:18.582Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "GridController.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using CustomAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Controllers\\GridController.cs", + "RelativeDocumentMoniker": "Grid_MSSQL\\Controllers\\GridController.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using CustomAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Controllers\\GridController.cs", + "RelativeToolTip": "Grid_MSSQL\\Controllers\\GridController.cs", + "ViewState": "AgIAAAkAAAAAAAAAAAAAAAsAAABFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-14T13:56:50.064Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "index.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using CustomAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.ts", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\index.ts", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using CustomAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.ts", + "RelativeToolTip": "Grid_MSSQL\\src\\index.ts", + "ViewState": "AgIAABsAAAAAAAAAAAAAAB8AAAAPAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-14T04:22:45.268Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "index.html", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using CustomAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\index.html", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using CustomAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeToolTip": "Grid_MSSQL\\src\\index.html", + "ViewState": "AgIAAAsAAAAAAAAAAAAuwB4AAAAHAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|", + "WhenOpened": "2025-04-14T04:22:42.151Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.metadata.v9.bin b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.metadata.v9.bin new file mode 100644 index 0000000..80725aa Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.metadata.v9.bin differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.projects.v9.bin b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.projects.v9.bin new file mode 100644 index 0000000..9e5d06f Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.projects.v9.bin differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.strings.v9.bin b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.strings.v9.bin new file mode 100644 index 0000000..200a0d1 Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.strings.v9.bin differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL.sln b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL.sln new file mode 100644 index 0000000..fb3f7f4 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35818.85 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grid_MSSQL", "Grid_MSSQL\Grid_MSSQL.csproj", "{917BECDF-887A-46C0-9B59-A64DF4698A2F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {917BECDF-887A-46C0-9B59-A64DF4698A2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {917BECDF-887A-46C0-9B59-A64DF4698A2F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {917BECDF-887A-46C0-9B59-A64DF4698A2F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {917BECDF-887A-46C0-9B59-A64DF4698A2F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EFC61BA5-DE1D-4965-9A60-AA2940B2B332} + EndGlobalSection +EndGlobal diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND.MDF b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND.MDF new file mode 100644 index 0000000..410aff3 Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND.MDF differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND_log.ldf b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND_log.ldf new file mode 100644 index 0000000..89f65c3 Binary files /dev/null and b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND_log.ldf differ diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/GridController.cs b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/GridController.cs new file mode 100644 index 0000000..ebb3863 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/GridController.cs @@ -0,0 +1,267 @@ +using Microsoft.AspNetCore.Mvc; +using System.ComponentModel.DataAnnotations; +using System.Data; +using Syncfusion.EJ2.Base; +using Microsoft.Data.SqlClient; + +namespace Grid_MSSQL.Controllers +{ + [ApiController] + public class GridController : ControllerBase + { + string ConnectionString = @""; + + /// + /// Processes the DataManager request to perform searching, filtering, sorting, and paging operations. + /// + /// Contains the details of the data operation requested. + /// Returns a JSON object with the filtered, sorted, and paginated data along with the total record count. + [HttpPost] + [Route("api/[controller]")] + public object Post([FromBody] DataManagerRequest DataManagerRequest) + { + // Retrieve data from the data source (e.g., database). + IQueryable DataSource = GetOrderData().AsQueryable(); + + // Initialize QueryableOperation instance. + QueryableOperation queryableOperation = new QueryableOperation(); + + // Handling searching operation. + if (DataManagerRequest.Search != null && DataManagerRequest.Search.Count > 0) + { + DataSource = queryableOperation.PerformSearching(DataSource, DataManagerRequest.Search); + // Add custom logic here if needed and remove above method. + } + + // Handling filtering operation. + if (DataManagerRequest.Where != null && DataManagerRequest.Where.Count > 0) + { + foreach (WhereFilter condition in DataManagerRequest.Where) + { + foreach (WhereFilter predicate in condition.predicates) + { + DataSource = queryableOperation.PerformFiltering(DataSource, DataManagerRequest.Where, predicate.Operator); + // Add custom logic here if needed and remove above method. + } + } + } + + // Handling sorting operation. + if (DataManagerRequest.Sorted != null && DataManagerRequest.Sorted.Count > 0) + { + DataSource = queryableOperation.PerformSorting(DataSource, DataManagerRequest.Sorted); + // Add custom logic here if needed and remove above method. + } + + // Get the total count of records. + int totalRecordsCount = DataSource.Count(); + + // Handling paging operation. + if (DataManagerRequest.Skip != 0) + { + DataSource = queryableOperation.PerformSkip(DataSource, DataManagerRequest.Skip); + // Add custom logic here if needed and remove above method. + } + if (DataManagerRequest.Take != 0) + { + DataSource = queryableOperation.PerformTake(DataSource, DataManagerRequest.Take); + // Add custom logic here if needed and remove above method. + } + + // Return data based on the request. + return new { result = DataSource, count = totalRecordsCount }; + } + /// + /// Retrieves the order data from the database. + /// + /// Returns a list of orders fetched from the database. + [HttpGet] + [Route("api/[controller]")] + public List GetOrderData() + { + string queryStr = "SELECT * FROM dbo.Orders ORDER BY OrderID;"; + SqlConnection sqlConnection = new(ConnectionString); + sqlConnection.Open(); + SqlCommand sqlCommand = new(queryStr, sqlConnection); + SqlDataAdapter DataAdapter = new(sqlCommand); + DataTable DataTable = new(); + DataAdapter.Fill(DataTable); + sqlConnection.Close(); + + // Map data to a list. + List dataSource = (from DataRow Data in DataTable.Rows + select new Orders() + { + OrderID = Convert.ToInt32(Data["OrderID"]), + CustomerID = Data["CustomerID"].ToString(), + EmployeeID = Convert.IsDBNull(Data["EmployeeID"]) ? 0 : Convert.ToUInt16(Data["EmployeeID"]), + ShipCity = Data["ShipCity"].ToString(), + Freight = Convert.ToDecimal(Data["Freight"]) + } + ).ToList(); + return dataSource; + } + + /// + /// Inserts a new data item into the data collection. + /// + /// It contains the new record detail which is need to be inserted. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Insert")] + public void Insert([FromBody] CRUDModel value) + { + //Create query to insert the specific into the database by accessing its properties. + string queryStr = $"Insert into Orders(CustomerID,Freight,ShipCity,EmployeeID) values('{value.value.CustomerID}','{value.value.Freight}','{value.value.ShipCity}','{value.value.EmployeeID}')"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + // Add custom logic here if needed and remove above method. + } + + /// + /// Update a existing data item from the data collection. + /// + /// It contains the updated record detail which is need to be updated. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Update")] + public void Update([FromBody] CRUDModel value) + { + // Create query to update the changes into the database by accessing its properties. + string queryStr = $"Update Orders set CustomerID='{value.value.CustomerID}', Freight='{value.value.Freight}',EmployeeID='{value.value.EmployeeID}',ShipCity='{value.value.ShipCity}' where OrderID='{value.value.OrderID}'"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + //Add custom logic here if needed and remove above method. + } + + /// + /// Remove a specific data item from the data collection. + /// + /// It contains the specific record detail which is need to be removed. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Remove")] + public void Remove([FromBody] CRUDModel value) + { + // Create query to remove the specific from database by passing the primary key column value. + string queryStr = $"Delete from Orders where OrderID={value.key}"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + // Add custom logic here if needed and remove above method. + } + + /// + /// Batch update (Insert, Update, and Delete) a collection of data items from the data collection. + /// + /// The set of information along with details about the CRUD actions to be executed from the database. + /// Returns void. + [HttpPost] + [Route("api/[controller]/BatchUpdate")] + public IActionResult BatchUpdate([FromBody] CRUDModel value) + { + if (value.changed != null && value.changed.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.changed) + { + // Create query to update the changes into the database by accessing its properties. + string queryStr = $"Update Orders set CustomerID='{Record.CustomerID}', Freight='{Record.Freight}',EmployeeID='{Record.EmployeeID}',ShipCity='{Record.ShipCity}' where OrderID='{Record.OrderID}'"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + // Add custom logic here if needed and remove above method. + } + } + if (value.added != null && value.added.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.added) + { + // Create query to insert the specific into the database by accessing its properties. + string queryStr = $"Insert into Orders(CustomerID,Freight,ShipCity,EmployeeID) values('{Record.CustomerID}','{Record.Freight}','{Record.ShipCity}','{Record.EmployeeID}')"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + // Add custom logic here if needed and remove above method. + } + } + if (value.deleted != null && value.deleted.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.deleted) + { + // Create query to remove the specific from database by passing the primary key column value. + string queryStr = $"Delete from Orders where OrderID={Record.OrderID}"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + // Add custom logic here if needed and remove above method. + } + } + return new JsonResult(value); + } + public class Orders + { + [Key] + public int? OrderID { get; set; } + public string? CustomerID { get; set; } + public int? EmployeeID { get; set; } + public decimal? Freight { get; set; } + public string? ShipCity { get; set; } + public string? ShipCountry { get; set; } + } + public class CRUDModel where T : class + { + public string? action { get; set; } + public string? keyColumn { get; set; } + public object? key { get; set; } + public T? value { get; set; } + public List? added { get; set; } + public List? changed { get; set; } + public List? deleted { get; set; } + public IDictionary? @params { get; set; } + } + } +} diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/WeatherForecastController.cs b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/WeatherForecastController.cs new file mode 100644 index 0000000..23d8746 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/WeatherForecastController.cs @@ -0,0 +1,32 @@ +using Microsoft.AspNetCore.Mvc; + +namespace Grid_MSSQL.Controllers; + +[ApiController] +[Route("[controller]")] +public class WeatherForecastController : ControllerBase +{ + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet(Name = "GetWeatherForecast")] + public IEnumerable Get() + { + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = Summaries[Random.Shared.Next(Summaries.Length)] + }) + .ToArray(); + } +} diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj new file mode 100644 index 0000000..a903a58 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj @@ -0,0 +1,20 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj.user b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj.user new file mode 100644 index 0000000..9ff5820 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj.user @@ -0,0 +1,6 @@ + + + + https + + \ No newline at end of file diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.http b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.http new file mode 100644 index 0000000..dba4ca3 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.http @@ -0,0 +1,6 @@ +@Grid_MSSQL_HostAddress = http://localhost:5241 + +GET {{Grid_MSSQL_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Program.cs b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Program.cs new file mode 100644 index 0000000..7d443da --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Program.cs @@ -0,0 +1,27 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +var app = builder.Build(); +app.UseDefaultFiles(); +app.UseStaticFiles(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} + +app.UseHttpsRedirection(); + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Properties/launchSettings.json b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Properties/launchSettings.json new file mode 100644 index 0000000..7eb2824 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/Properties/launchSettings.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:2345", + "sslPort": 44345 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:5241", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + //"launchUrl": "swagger", + "applicationUrl": "https://localhost:7097;http://localhost:5241", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/WeatherForecast.cs b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/WeatherForecast.cs new file mode 100644 index 0000000..a0f3974 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/WeatherForecast.cs @@ -0,0 +1,13 @@ +namespace Grid_MSSQL +{ + public class WeatherForecast + { + public DateOnly Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string? Summary { get; set; } + } +} diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.Development.json b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.json b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/package.json b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/package.json new file mode 100644 index 0000000..d43d704 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/package.json @@ -0,0 +1,29 @@ +{ + "name": "grid_mssql", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "build": "webpack --mode=development --watch", + "release": "webpack --mode=production", + "publish": "npm run release && dotnet publish -c Release" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "devDependencies": { + "clean-webpack-plugin": "4.0.0", + "css-loader": "7.1.2", + "html-webpack-plugin": "5.6.3", + "mini-css-extract-plugin": "2.9.2", + "ts-loader": "9.5.2", + "typescript": "5.8.2", + "webpack": "5.98.0", + "webpack-cli": "6.0.1" + }, + "dependencies": { + "@syncfusion/ej2-data": "^29.1.33", + "@syncfusion/ej2-grids": "^29.1.33", + "@types/node": "^22.14.0" + } +} diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/CustomAdaptor.ts b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/CustomAdaptor.ts new file mode 100644 index 0000000..29e98fe --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/CustomAdaptor.ts @@ -0,0 +1,61 @@ +import { UrlAdaptor } from '@syncfusion/ej2-data'; + +export class CustomAdaptor extends UrlAdaptor { + public override processResponse(): any { + // Calling base class processResponse function. + const original: any = super.processResponse.apply(this, arguments as any); + return original; + } + + public override insert(dm: any, data: any): any { + return { + url: dm.dataSource.insertUrl || dm.dataSource.url, + data: JSON.stringify({ + __RequestVerificationToken: "Syncfusion", + value: data, + action: 'insert' + }), + type: 'POST' + }; + } + + public override update(dm: any, keyField: string, value: any): any { + return { + url: dm.dataSource.updateUrl || dm.dataSource.url, + data: JSON.stringify({ + __RequestVerificationToken: "Syncfusion", + value: value, + action: 'update' + }), + type: 'POST' + }; + } + + public override remove(dm: any, keyField: string, value: any): any { + return { + url: dm.dataSource.removeUrl || dm.dataSource.url, + data: JSON.stringify({ + __RequestVerificationToken: "Syncfusion", + key: value, + keyColumn: keyField, + action: 'remove' + }), + type: 'POST' + }; + } + + public override batchRequest(dm: any, changes: any, e: any, query: any, original?: Object): Object { + return { + url: dm.dataSource.batchUrl || dm.dataSource.url, + data: JSON.stringify({ + __RequestVerificationToken: "Syncfusion", + added: changes.addedRecords, + changed: changes.changedRecords, + deleted: changes.deletedRecords, + key: e.key, + action: 'batch' + }), + type: 'POST' + }; + } +} \ No newline at end of file diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.html b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.html new file mode 100644 index 0000000..64370fd --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.html @@ -0,0 +1,31 @@ + + + + EJ2 Grid + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.ts b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.ts new file mode 100644 index 0000000..ee5f7a3 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.ts @@ -0,0 +1,35 @@ +import { Grid, Toolbar, Filter, Sort, Group, Page, Edit } from '@syncfusion/ej2-grids'; +import { DataManager } from '@syncfusion/ej2-data'; +import { CustomAdaptor } from './CustomAdaptor'; + +Grid.Inject(Toolbar, Filter, Sort, Group, Page, Edit); + +let data: DataManager = new DataManager({ + url: 'https://localhost:xxxx/api/Grid', + insertUrl: 'https://localhost:xxxx/api/Grid/Insert', + updateUrl: 'https://localhost:xxxx/api/Grid/Update', + removeUrl: 'https://localhost:xxxx/api/Grid/Remove', + // Enable batch URL when batch editing is enabled. + // batchUrl: 'https://localhost:xxxx/api/Grid/BatchUpdate', + adaptor: new CustomAdaptor() +}); + +let grid: Grid = new Grid({ + dataSource: data, + allowGrouping: true, + allowFiltering: true, + allowSorting: true, + allowPaging: true, + toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel', 'Search'], + editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true }, + columns: [ + { field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 100, isPrimaryKey: true, isIdentity: true, type: 'number' }, + { field: 'CustomerID', headerText: 'Customer ID', validationRules: { required: true }, type: 'string', width: 100 }, + { field: 'EmployeeID', headerText: 'Employee ID', validationRules: { required: true, number: true }, width: 100 }, + { field: 'Freight', headerText: 'Freight', validationRules: { required: true, min: 1, max: 1000 }, textAlign: 'Right', width: 100 }, + { field: 'ShipCity', headerText: 'Ship City', validationRules: { required: true }, textAlign: 'Right', width: 120 } + ], + height: 348 +}); + +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/tsconfig.json b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/tsconfig.json new file mode 100644 index 0000000..344e4dd --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/src/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "noEmitOnError": true, + "removeComments": false, + "sourceMap": true, + "target": "es5" + }, + "exclude": [ + "node_modules", + "wwwroot" + ] +} \ No newline at end of file diff --git a/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/webpack.config.js b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/webpack.config.js new file mode 100644 index 0000000..cc2de70 --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/Grid_MSSQL/Grid_MSSQL/webpack.config.js @@ -0,0 +1,37 @@ +const path = require("path"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const { CleanWebpackPlugin } = require("clean-webpack-plugin"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + entry: "./src/index.ts", + output: { + path: path.resolve(__dirname, "wwwroot"), + filename: "[name].[chunkhash].js", + publicPath: "/", + }, + resolve: { + extensions: [".js", ".ts"], + }, + module: { + rules: [ + { + test: /\.ts$/, + use: "ts-loader", + }, + { + test: /\.css$/, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, + plugins: [ + new CleanWebpackPlugin(), + new HtmlWebpackPlugin({ + template: "./src/index.html", + }), + new MiniCssExtractPlugin({ + filename: "css/[name].[chunkhash].css", + }), + ], +}; \ No newline at end of file diff --git a/Binding MS SQL database using CustomAdaptor/README.md b/Binding MS SQL database using CustomAdaptor/README.md new file mode 100644 index 0000000..f57f0fe --- /dev/null +++ b/Binding MS SQL database using CustomAdaptor/README.md @@ -0,0 +1,20 @@ +## TypeScript Grid MSSQL connectivity using CustomAdaptor + +A project that enables data binding and CRUD action handling in the Syncfusion TypeScript Grid to a MSSQL Server using CustomAdaptor feature of the Grid. + +## Steps to Run the Sample + +1. Download or unzip the project and open the project in **Visual Studio 2022**. + +2. Replace the connected database's connection string in the `GridController.cs` file. + +3. In the TypeScript client project, open `src/index.ts` and replace the port number in the API URL where it says `xxxx` with the actual backend server port. + +4. Navigate to the client project folder and run the following command: + + ```bash + npm install + ``` +5. Build the project to restore dependencies and compile it. + +6. Run the project. \ No newline at end of file diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/DesignTimeBuild/.dtbcache.v2 b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..e9674a9 Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/DesignTimeBuild/.dtbcache.v2 differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/2ce4a44d-82e8-4b1b-af77-cc1ae0e69b13.vsidx b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/2ce4a44d-82e8-4b1b-af77-cc1ae0e69b13.vsidx new file mode 100644 index 0000000..d672746 Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/2ce4a44d-82e8-4b1b-af77-cc1ae0e69b13.vsidx differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/8e180f45-b93a-45b4-823a-230a22ff23e3.vsidx b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/8e180f45-b93a-45b4-823a-230a22ff23e3.vsidx new file mode 100644 index 0000000..c666319 Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/8e180f45-b93a-45b4-823a-230a22ff23e3.vsidx differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/9b8034f6-13e1-4fa6-90f3-2953591b36c7.vsidx b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/9b8034f6-13e1-4fa6-90f3-2953591b36c7.vsidx new file mode 100644 index 0000000..338db8c Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/9b8034f6-13e1-4fa6-90f3-2953591b36c7.vsidx differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/d023bd5e-4235-48be-9357-5851ae7d83b9.vsidx b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/d023bd5e-4235-48be-9357-5851ae7d83b9.vsidx new file mode 100644 index 0000000..7ebbc62 Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/d023bd5e-4235-48be-9357-5851ae7d83b9.vsidx differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/d906485f-cdc2-45d1-8d27-a62d2e87dff3.vsidx b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/d906485f-cdc2-45d1-8d27-a62d2e87dff3.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/FileContentIndex/d906485f-cdc2-45d1-8d27-a62d2e87dff3.vsidx differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/config/applicationhost.config b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/config/applicationhost.config new file mode 100644 index 0000000..0d88f0d --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/config/applicationhost.config @@ -0,0 +1,1016 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.futdcache.v2 b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.futdcache.v2 new file mode 100644 index 0000000..a9d8ba9 Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.futdcache.v2 differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.suo b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.suo new file mode 100644 index 0000000..3fe81df Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/.suo differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.backup.json b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..141071d --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.backup.json @@ -0,0 +1,181 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\Component\\EJ2\\Samples\\JS-TS\\DataBase_Samples\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\grid_mssql.http||{5703B403-55E7-4C63-8C88-A8F52C7A45C5}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\grid_mssql.http||{5703B403-55E7-4C63-8C88-A8F52C7A45C5}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 7, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "index.html", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\JS-TS\\DataBase_Samples\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeDocumentMoniker": "..\\..\\..\\..\\Samples\\JS-TS\\DataBase_Samples\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "ToolTip": "D:\\Component\\EJ2\\Samples\\JS-TS\\DataBase_Samples\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeToolTip": "..\\..\\..\\..\\Samples\\JS-TS\\DataBase_Samples\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|", + "WhenOpened": "2025-04-04T14:42:51.772Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "tsconfig.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\tsconfig.json", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\tsconfig.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\tsconfig.json", + "RelativeToolTip": "Grid_MSSQL\\src\\tsconfig.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-04T10:34:54.351Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "launchSettings.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Properties\\launchSettings.json", + "RelativeDocumentMoniker": "Grid_MSSQL\\Properties\\launchSettings.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Properties\\launchSettings.json", + "RelativeToolTip": "Grid_MSSQL\\Properties\\launchSettings.json", + "ViewState": "AgIAAA8AAAAAAAAAAAAAABgAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-04T10:34:04.071Z" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "package.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\package.json", + "RelativeDocumentMoniker": "Grid_MSSQL\\package.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\package.json", + "RelativeToolTip": "Grid_MSSQL\\package.json", + "ViewState": "AgIAAA8AAAAAAAAAAAAAABkAAAAoAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-04T10:31:23.836Z" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "webpack.config.js", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\webpack.config.js", + "RelativeDocumentMoniker": "Grid_MSSQL\\webpack.config.js", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\webpack.config.js", + "RelativeToolTip": "Grid_MSSQL\\webpack.config.js", + "ViewState": "AgIAAA4AAAAAAAAAAAAowCQAAAACAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|", + "WhenOpened": "2025-04-04T10:31:03.699Z" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "index.html", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\index.html", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeToolTip": "Grid_MSSQL\\src\\index.html", + "ViewState": "AgIAAAwAAAAAAAAAAAAQwBMAAAA2AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|", + "WhenOpened": "2025-04-04T10:29:34.659Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "index.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.ts", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\index.ts", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.ts", + "RelativeToolTip": "Grid_MSSQL\\src\\index.ts", + "ViewState": "AgIAABIAAAAAAAAAAAAAAAsAAAAGAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-04T10:29:24.407Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "GridController.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Controllers\\GridController.cs", + "RelativeDocumentMoniker": "Grid_MSSQL\\Controllers\\GridController.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Controllers\\GridController.cs", + "RelativeToolTip": "Grid_MSSQL\\Controllers\\GridController.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAANAAAAA9AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-04T10:28:09.978Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "Program.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Program.cs", + "RelativeDocumentMoniker": "Grid_MSSQL\\Program.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Program.cs", + "RelativeToolTip": "Grid_MSSQL\\Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAAVAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-04T10:25:40.641Z" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "Grid_MSSQL.http", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Grid_MSSQL.http", + "RelativeDocumentMoniker": "Grid_MSSQL\\Grid_MSSQL.http", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Grid_MSSQL.http", + "RelativeToolTip": "Grid_MSSQL\\Grid_MSSQL.http", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003502|", + "WhenOpened": "2025-04-04T10:25:38.542Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.json b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.json new file mode 100644 index 0000000..77281c7 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/Grid_MSSQL/v17/DocumentLayout.json @@ -0,0 +1,181 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\Component\\EJ2\\Samples\\JS-TS\\DataBase_Samples\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}" + }, + { + "AbsoluteMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding ms sql database using urladaptor\\grid_mssql\\grid_mssql\\grid_mssql.http||{5703B403-55E7-4C63-8C88-A8F52C7A45C5}", + "RelativeMoniker": "D:0:0:{645D0248-058E-49BA-8674-24BD288D2DB2}|Grid_MSSQL\\Grid_MSSQL.csproj|solutionrelative:grid_mssql\\grid_mssql.http||{5703B403-55E7-4C63-8C88-A8F52C7A45C5}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 6, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "index.html", + "DocumentMoniker": "D:\\Component\\EJ2\\Samples\\JS-TS\\DataBase_Samples\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeDocumentMoniker": "..\\..\\..\\..\\Samples\\JS-TS\\DataBase_Samples\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "ToolTip": "D:\\Component\\EJ2\\Samples\\JS-TS\\DataBase_Samples\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeToolTip": "..\\..\\..\\..\\Samples\\JS-TS\\DataBase_Samples\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|", + "WhenOpened": "2025-04-04T14:42:51.772Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "tsconfig.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\tsconfig.json", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\tsconfig.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\tsconfig.json", + "RelativeToolTip": "Grid_MSSQL\\src\\tsconfig.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-04T10:34:54.351Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "launchSettings.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Properties\\launchSettings.json", + "RelativeDocumentMoniker": "Grid_MSSQL\\Properties\\launchSettings.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Properties\\launchSettings.json", + "RelativeToolTip": "Grid_MSSQL\\Properties\\launchSettings.json", + "ViewState": "AgIAAA8AAAAAAAAAAAAAABgAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-04T10:34:04.071Z" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "package.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\package.json", + "RelativeDocumentMoniker": "Grid_MSSQL\\package.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\package.json", + "RelativeToolTip": "Grid_MSSQL\\package.json", + "ViewState": "AgIAAA8AAAAAAAAAAAAAABkAAAAoAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-04T10:31:23.836Z" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "webpack.config.js", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\webpack.config.js", + "RelativeDocumentMoniker": "Grid_MSSQL\\webpack.config.js", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\webpack.config.js", + "RelativeToolTip": "Grid_MSSQL\\webpack.config.js", + "ViewState": "AgIAAA4AAAAAAAAAAAAowCQAAAACAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|", + "WhenOpened": "2025-04-04T10:31:03.699Z" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "index.html", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\index.html", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.html", + "RelativeToolTip": "Grid_MSSQL\\src\\index.html", + "ViewState": "AgIAAAwAAAAAAAAAAAAQwBMAAAA2AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|", + "WhenOpened": "2025-04-04T10:29:34.659Z" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "index.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.ts", + "RelativeDocumentMoniker": "Grid_MSSQL\\src\\index.ts", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\src\\index.ts", + "RelativeToolTip": "Grid_MSSQL\\src\\index.ts", + "ViewState": "AgIAAAMAAAAAAAAAAAAAAB4AAAAPAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-04T10:29:24.407Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "GridController.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Controllers\\GridController.cs", + "RelativeDocumentMoniker": "Grid_MSSQL\\Controllers\\GridController.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Controllers\\GridController.cs", + "RelativeToolTip": "Grid_MSSQL\\Controllers\\GridController.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAANAAAAA9AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-04T10:28:09.978Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "Program.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Program.cs", + "RelativeDocumentMoniker": "Grid_MSSQL\\Program.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Program.cs", + "RelativeToolTip": "Grid_MSSQL\\Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAAVAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-04T10:25:40.641Z" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "Grid_MSSQL.http", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Grid_MSSQL.http", + "RelativeDocumentMoniker": "Grid_MSSQL\\Grid_MSSQL.http", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding MS SQL database using UrlAdaptor\\Grid_MSSQL\\Grid_MSSQL\\Grid_MSSQL.http", + "RelativeToolTip": "Grid_MSSQL\\Grid_MSSQL.http", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003502|", + "WhenOpened": "2025-04-04T10:25:38.542Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.metadata.v9.bin b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.metadata.v9.bin new file mode 100644 index 0000000..770f823 Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.metadata.v9.bin differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.projects.v9.bin b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.projects.v9.bin new file mode 100644 index 0000000..0e44357 Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.projects.v9.bin differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.strings.v9.bin b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.strings.v9.bin new file mode 100644 index 0000000..3df2871 Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/.vs/ProjectEvaluation/grid_mssql.strings.v9.bin differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL.sln b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL.sln new file mode 100644 index 0000000..f9257a4 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35818.85 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grid_MSSQL", "Grid_MSSQL\Grid_MSSQL.csproj", "{645D0248-058E-49BA-8674-24BD288D2DB2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {645D0248-058E-49BA-8674-24BD288D2DB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {645D0248-058E-49BA-8674-24BD288D2DB2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {645D0248-058E-49BA-8674-24BD288D2DB2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {645D0248-058E-49BA-8674-24BD288D2DB2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1B5FEEA6-BF67-4F55-9E2E-1D7A878685F6} + EndGlobalSection +EndGlobal diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND.MDF b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND.MDF new file mode 100644 index 0000000..463c0d3 Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND.MDF differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND_log.ldf b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND_log.ldf new file mode 100644 index 0000000..2d5355c Binary files /dev/null and b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/App_Data/NORTHWIND_log.ldf differ diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/GridController.cs b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/GridController.cs new file mode 100644 index 0000000..87212d3 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/GridController.cs @@ -0,0 +1,271 @@ + + + +using Microsoft.AspNetCore.Mvc; +using System.ComponentModel.DataAnnotations; +using System.Data; +using Syncfusion.EJ2.Base; +using Microsoft.Data.SqlClient; + +namespace Grid_MSSQL.Controllers +{ + + [ApiController] + public class GridController : ControllerBase + { + string ConnectionString = @""; + + /// + /// Processes the DataManager request to perform searching, filtering, sorting, and paging operations. + /// + /// Contains the details of the data operation requested. + /// Returns a JSON object with the filtered, sorted, and paginated data along with the total record count. + [HttpPost] + [Route("api/[controller]")] + public object Post([FromBody] DataManagerRequest DataManagerRequest) + { + // Retrieve data from the data source (e.g., database). + IQueryable DataSource = GetOrderData().AsQueryable(); + + // Initialize QueryableOperation instance. + QueryableOperation queryableOperation = new QueryableOperation(); + + // Handling searching operation. + if (DataManagerRequest.Search != null && DataManagerRequest.Search.Count > 0) + { + DataSource = queryableOperation.PerformSearching(DataSource, DataManagerRequest.Search); + // Add custom logic here if needed and remove above method. + } + + // Handling filtering operation. + if (DataManagerRequest.Where != null && DataManagerRequest.Where.Count > 0) + { + foreach (WhereFilter condition in DataManagerRequest.Where) + { + foreach (WhereFilter predicate in condition.predicates) + { + DataSource = queryableOperation.PerformFiltering(DataSource, DataManagerRequest.Where, predicate.Operator); + // Add custom logic here if needed and remove above method. + } + } + } + + // Handling sorting operation. + if (DataManagerRequest.Sorted != null && DataManagerRequest.Sorted.Count > 0) + { + DataSource = queryableOperation.PerformSorting(DataSource, DataManagerRequest.Sorted); + // Add custom logic here if needed and remove above method. + } + + // Get the total count of records. + int totalRecordsCount = DataSource.Count(); + + // Handling paging operation. + if (DataManagerRequest.Skip != 0) + { + DataSource = queryableOperation.PerformSkip(DataSource, DataManagerRequest.Skip); + // Add custom logic here if needed and remove above method. + } + if (DataManagerRequest.Take != 0) + { + DataSource = queryableOperation.PerformTake(DataSource, DataManagerRequest.Take); + // Add custom logic here if needed and remove above method. + } + + // Return data based on the request. + return new { result = DataSource, count = totalRecordsCount }; + } + /// + /// Retrieves the order data from the database. + /// + /// Returns a list of orders fetched from the database. + [HttpGet] + [Route("api/[controller]")] + public List GetOrderData() + { + string queryStr = "SELECT * FROM dbo.Orders ORDER BY OrderID;"; + SqlConnection sqlConnection = new(ConnectionString); + sqlConnection.Open(); + SqlCommand sqlCommand = new(queryStr, sqlConnection); + SqlDataAdapter DataAdapter = new(sqlCommand); + DataTable DataTable = new(); + DataAdapter.Fill(DataTable); + sqlConnection.Close(); + + // Map data to a list. + List dataSource = (from DataRow Data in DataTable.Rows + select new Orders() + { + OrderID = Convert.ToInt32(Data["OrderID"]), + CustomerID = Data["CustomerID"].ToString(), + EmployeeID = Convert.IsDBNull(Data["EmployeeID"]) ? 0 : Convert.ToUInt16(Data["EmployeeID"]), + ShipCity = Data["ShipCity"].ToString(), + Freight = Convert.ToDecimal(Data["Freight"]) + } + ).ToList(); + return dataSource; + } + + /// + /// Inserts a new data item into the data collection. + /// + /// It contains the new record detail which is need to be inserted. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Insert")] + public void Insert([FromBody] CRUDModel value) + { + //Create query to insert the specific into the database by accessing its properties. + string queryStr = $"Insert into Orders(CustomerID,Freight,ShipCity,EmployeeID) values('{value.value.CustomerID}','{value.value.Freight}','{value.value.ShipCity}','{value.value.EmployeeID}')"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + // Add custom logic here if needed and remove above method. + } + + /// + /// Update a existing data item from the data collection. + /// + /// It contains the updated record detail which is need to be updated. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Update")] + public void Update([FromBody] CRUDModel value) + { + // Create query to update the changes into the database by accessing its properties. + string queryStr = $"Update Orders set CustomerID='{value.value.CustomerID}', Freight='{value.value.Freight}',EmployeeID='{value.value.EmployeeID}',ShipCity='{value.value.ShipCity}' where OrderID='{value.value.OrderID}'"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + //Add custom logic here if needed and remove above method. + } + + /// + /// Remove a specific data item from the data collection. + /// + /// It contains the specific record detail which is need to be removed. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Remove")] + public void Remove([FromBody] CRUDModel value) + { + // Create query to remove the specific from database by passing the primary key column value. + string queryStr = $"Delete from Orders where OrderID={value.key}"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + // Add custom logic here if needed and remove above method. + } + + /// + /// Batch update (Insert, Update, and Delete) a collection of data items from the data collection. + /// + /// The set of information along with details about the CRUD actions to be executed from the database. + /// Returns void. + [HttpPost] + [Route("api/[controller]/BatchUpdate")] + public IActionResult BatchUpdate([FromBody] CRUDModel value) + { + if (value.changed != null && value.changed.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.changed) + { + // Create query to update the changes into the database by accessing its properties. + string queryStr = $"Update Orders set CustomerID='{Record.CustomerID}', Freight='{Record.Freight}',EmployeeID='{Record.EmployeeID}',ShipCity='{Record.ShipCity}' where OrderID='{Record.OrderID}'"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + // Add custom logic here if needed and remove above method. + } + } + if (value.added != null && value.added.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.added) + { + // Create query to insert the specific into the database by accessing its properties. + string queryStr = $"Insert into Orders(CustomerID,Freight,ShipCity,EmployeeID) values('{Record.CustomerID}','{Record.Freight}','{Record.ShipCity}','{Record.EmployeeID}')"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + // Add custom logic here if needed and remove above method. + } + } + if (value.deleted != null && value.deleted.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.deleted) + { + // Create query to remove the specific from database by passing the primary key column value. + string queryStr = $"Delete from Orders where OrderID={Record.OrderID}"; + SqlConnection SqlConnection = new SqlConnection(ConnectionString); + SqlConnection.Open(); + + // Execute the SQL command. + SqlCommand SqlCommand = new SqlCommand(queryStr, SqlConnection); + + // Execute this code to reflect the changes into the database. + SqlCommand.ExecuteNonQuery(); + SqlConnection.Close(); + + // Add custom logic here if needed and remove above method. + } + } + return new JsonResult(value); + } + public class Orders + { + [Key] + public int? OrderID { get; set; } + public string? CustomerID { get; set; } + public int? EmployeeID { get; set; } + public decimal? Freight { get; set; } + public string? ShipCity { get; set; } + public string? ShipCountry { get; set; } + } + public class CRUDModel where T : class + { + public string? action { get; set; } + public string? keyColumn { get; set; } + public object? key { get; set; } + public T? value { get; set; } + public List? added { get; set; } + public List? changed { get; set; } + public List? deleted { get; set; } + public IDictionary? @params { get; set; } + } + } +} diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/WeatherForecastController.cs b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/WeatherForecastController.cs new file mode 100644 index 0000000..23d8746 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Controllers/WeatherForecastController.cs @@ -0,0 +1,32 @@ +using Microsoft.AspNetCore.Mvc; + +namespace Grid_MSSQL.Controllers; + +[ApiController] +[Route("[controller]")] +public class WeatherForecastController : ControllerBase +{ + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet(Name = "GetWeatherForecast")] + public IEnumerable Get() + { + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = Summaries[Random.Shared.Next(Summaries.Length)] + }) + .ToArray(); + } +} diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj new file mode 100644 index 0000000..46baac5 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj @@ -0,0 +1,24 @@ + + + + net8.0 + enable + enable + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj.user b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj.user new file mode 100644 index 0000000..9ff5820 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.csproj.user @@ -0,0 +1,6 @@ + + + + https + + \ No newline at end of file diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.http b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.http new file mode 100644 index 0000000..9afa98d --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Grid_MSSQL.http @@ -0,0 +1,6 @@ +@Grid_MSSQL_HostAddress = http://localhost:5028 + +GET {{Grid_MSSQL_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Program.cs b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Program.cs new file mode 100644 index 0000000..8841217 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Program.cs @@ -0,0 +1,26 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} +app.UseDefaultFiles(); +app.UseStaticFiles(); +app.UseHttpsRedirection(); + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Properties/launchSettings.json b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Properties/launchSettings.json new file mode 100644 index 0000000..e8f029a --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/Properties/launchSettings.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:24579", + "sslPort": 44300 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:5028", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + //"launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:7279;http://localhost:5028", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/WeatherForecast.cs b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/WeatherForecast.cs new file mode 100644 index 0000000..a0f3974 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/WeatherForecast.cs @@ -0,0 +1,13 @@ +namespace Grid_MSSQL +{ + public class WeatherForecast + { + public DateOnly Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string? Summary { get; set; } + } +} diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.Development.json b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.json b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/package.json b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/package.json new file mode 100644 index 0000000..d43d704 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/package.json @@ -0,0 +1,29 @@ +{ + "name": "grid_mssql", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "build": "webpack --mode=development --watch", + "release": "webpack --mode=production", + "publish": "npm run release && dotnet publish -c Release" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "devDependencies": { + "clean-webpack-plugin": "4.0.0", + "css-loader": "7.1.2", + "html-webpack-plugin": "5.6.3", + "mini-css-extract-plugin": "2.9.2", + "ts-loader": "9.5.2", + "typescript": "5.8.2", + "webpack": "5.98.0", + "webpack-cli": "6.0.1" + }, + "dependencies": { + "@syncfusion/ej2-data": "^29.1.33", + "@syncfusion/ej2-grids": "^29.1.33", + "@types/node": "^22.14.0" + } +} diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.html b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.html new file mode 100644 index 0000000..64370fd --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.html @@ -0,0 +1,31 @@ + + + + EJ2 Grid + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.js b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.js new file mode 100644 index 0000000..045a004 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var ej2_grids_1 = require("@syncfusion/ej2-grids"); +var ej2_data_1 = require("@syncfusion/ej2-data"); +ej2_grids_1.Grid.Inject(ej2_grids_1.Toolbar, ej2_grids_1.Filter, ej2_grids_1.Sort, ej2_grids_1.Group, ej2_grids_1.Page, ej2_grids_1.Edit); +var data = new ej2_data_1.DataManager({ + url: 'https://localhost:7279/api/Grid', + insertUrl: 'https://localhost:7279/api/Grid/Insert', + updateUrl: 'https://localhost:7279/api/Grid/Update', + removeUrl: 'https://localhost:7279/api/Grid/Remove', + // Enable batch URL when batch editing is enabled. + batchUrl: 'https://localhost:7279/api/Grid/BatchUpdate', + adaptor: new ej2_data_1.UrlAdaptor() +}); +var grid = new ej2_grids_1.Grid({ + dataSource: data, + allowGrouping: true, + allowFiltering: true, + allowSorting: true, + allowPaging: true, + toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel', 'Search'], + editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true }, + columns: [ + { field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 100, isPrimaryKey: true, isIdentity: true, type: 'number' }, + { field: 'CustomerID', headerText: 'Customer ID', validationRules: { required: true }, type: 'string', width: 100 }, + { field: 'EmployeeID', headerText: 'Employee ID', validationRules: { required: true, number: true }, width: 100 }, + { field: 'Freight', headerText: 'Freight', validationRules: { required: true, min: 1, max: 1000 }, textAlign: 'Right', width: 100 }, + { field: 'ShipCity', headerText: 'Ship City', validationRules: { required: true }, textAlign: 'Right', width: 120 } + ], + height: 250 +}); +grid.appendTo('#Grid'); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.js.map b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.js.map new file mode 100644 index 0000000..8174ce4 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAAA,mDAAuF;AACvF,iDAA+D;AAE/D,gBAAI,CAAC,MAAM,CAAC,mBAAO,EAAE,kBAAM,EAAE,gBAAI,EAAE,iBAAK,EAAE,gBAAI,EAAE,gBAAI,CAAC,CAAC;AAEtD,IAAI,IAAI,GAAgB,IAAI,sBAAW,CAAC;IACpC,GAAG,EAAE,iCAAiC;IACtC,SAAS,EAAE,wCAAwC;IACnD,SAAS,EAAE,wCAAwC;IACnD,SAAS,EAAE,wCAAwC;IACnD,kDAAkD;IAClD,QAAQ,EAAE,6CAA6C;IACvD,OAAO,EAAE,IAAI,qBAAU,EAAE;CAC5B,CAAC,CAAC;AAEH,IAAI,IAAI,GAAS,IAAI,gBAAI,CAAC;IACtB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,IAAI;IAClB,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;IAChE,YAAY,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC5E,OAAO,EAAE;QACL,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClI,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;QACnH,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;QACjH,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE;QACnI,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE;KACtH;IACD,MAAM,EAAE,GAAG;CACd,CAAC,CAAC;AAEH,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.ts b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.ts new file mode 100644 index 0000000..6a1d3a4 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/index.ts @@ -0,0 +1,34 @@ +import { Grid, Toolbar, Filter, Sort, Group, Page, Edit } from '@syncfusion/ej2-grids'; +import { DataManager, UrlAdaptor } from '@syncfusion/ej2-data'; + +Grid.Inject(Toolbar, Filter, Sort, Group, Page, Edit); + +let data: DataManager = new DataManager({ + url: 'https://localhost:xxxx/api/Grid', + insertUrl: 'https://localhost:xxxx/api/Grid/Insert', + updateUrl: 'https://localhost:xxxx/api/Grid/Update', + removeUrl: 'https://localhost:xxxx/api/Grid/Remove', + // Enable batch URL when batch editing is enabled. + //batchUrl: 'https://localhost:xxxx/api/Grid/BatchUpdate', + adaptor: new UrlAdaptor() +}); + +let grid: Grid = new Grid({ + dataSource: data, + allowGrouping: true, + allowFiltering: true, + allowSorting: true, + allowPaging: true, + toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel', 'Search'], + editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true }, + columns: [ + { field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 100, isPrimaryKey: true, isIdentity: true, type: 'number' }, + { field: 'CustomerID', headerText: 'Customer ID', validationRules: { required: true }, type: 'string', width: 100 }, + { field: 'EmployeeID', headerText: 'Employee ID', validationRules: { required: true, number: true }, width: 100 }, + { field: 'Freight', headerText: 'Freight', validationRules: { required: true, min: 1, max: 1000 }, textAlign: 'Right', width: 100 }, + { field: 'ShipCity', headerText: 'Ship City', validationRules: { required: true }, textAlign: 'Right', width: 120 } + ], + height: 348 +}); + +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/tsconfig.json b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/tsconfig.json new file mode 100644 index 0000000..344e4dd --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/src/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "noEmitOnError": true, + "removeComments": false, + "sourceMap": true, + "target": "es5" + }, + "exclude": [ + "node_modules", + "wwwroot" + ] +} \ No newline at end of file diff --git a/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/webpack.config.js b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/webpack.config.js new file mode 100644 index 0000000..cc2de70 --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/Grid_MSSQL/Grid_MSSQL/webpack.config.js @@ -0,0 +1,37 @@ +const path = require("path"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const { CleanWebpackPlugin } = require("clean-webpack-plugin"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + entry: "./src/index.ts", + output: { + path: path.resolve(__dirname, "wwwroot"), + filename: "[name].[chunkhash].js", + publicPath: "/", + }, + resolve: { + extensions: [".js", ".ts"], + }, + module: { + rules: [ + { + test: /\.ts$/, + use: "ts-loader", + }, + { + test: /\.css$/, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, + plugins: [ + new CleanWebpackPlugin(), + new HtmlWebpackPlugin({ + template: "./src/index.html", + }), + new MiniCssExtractPlugin({ + filename: "css/[name].[chunkhash].css", + }), + ], +}; \ No newline at end of file diff --git a/Binding MS SQL database using UrlAdaptor/README.md b/Binding MS SQL database using UrlAdaptor/README.md new file mode 100644 index 0000000..6023caa --- /dev/null +++ b/Binding MS SQL database using UrlAdaptor/README.md @@ -0,0 +1,20 @@ +## TypeScript Grid MSSQL connectivity using URLAdaptor + +A project that enables data binding and CRUD action handling in the Syncfusion TypeScript Grid to a MSSQL Server using URLAdaptor feature of the Grid. + +## Steps to Run the Sample + +1. Download or unzip the project and open the project in **Visual Studio 2022**. + +2. Replace the connected database's connection string in the `GridController.cs` file. + +3. In the TypeScript client project, open `src/index.ts` and replace the port number in the API URL where it says `xxxx` with the actual backend server port. + +4. Navigate to the client project folder and run the following command: + + ```bash + npm install + ``` +5. Build the project to restore dependencies and compile it. + +6. Run the project. \ No newline at end of file diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/DesignTimeBuild/.dtbcache.v2 b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..829be7b Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/DesignTimeBuild/.dtbcache.v2 differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/3c4e3ac7-1b65-44ce-b0bb-acc22a0ee04b.vsidx b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/3c4e3ac7-1b65-44ce-b0bb-acc22a0ee04b.vsidx new file mode 100644 index 0000000..55f7291 Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/3c4e3ac7-1b65-44ce-b0bb-acc22a0ee04b.vsidx differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/7e9266d6-4ffc-433f-b146-4bb895b14d5e.vsidx b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/7e9266d6-4ffc-433f-b146-4bb895b14d5e.vsidx new file mode 100644 index 0000000..f082f5c Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/7e9266d6-4ffc-433f-b146-4bb895b14d5e.vsidx differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/8a6ef46f-9d51-4fc0-98d6-920f20e18996.vsidx b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/8a6ef46f-9d51-4fc0-98d6-920f20e18996.vsidx new file mode 100644 index 0000000..0232519 Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/8a6ef46f-9d51-4fc0-98d6-920f20e18996.vsidx differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/d13e8dd8-c1ac-43cf-b513-854237b49d69.vsidx b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/d13e8dd8-c1ac-43cf-b513-854237b49d69.vsidx new file mode 100644 index 0000000..aff2ceb Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/d13e8dd8-c1ac-43cf-b513-854237b49d69.vsidx differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/eacc57a6-24ac-4ff8-bdfa-b49629038fd9.vsidx b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/eacc57a6-24ac-4ff8-bdfa-b49629038fd9.vsidx new file mode 100644 index 0000000..c6b19eb Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/FileContentIndex/eacc57a6-24ac-4ff8-bdfa-b49629038fd9.vsidx differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/config/applicationhost.config b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/config/applicationhost.config new file mode 100644 index 0000000..0d88f0d --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/config/applicationhost.config @@ -0,0 +1,1016 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/.futdcache.v2 b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/.futdcache.v2 new file mode 100644 index 0000000..d06316e Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/.futdcache.v2 differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/.suo b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/.suo new file mode 100644 index 0000000..8fe2d44 Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/.suo differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/DocumentLayout.backup.json b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..f2851d6 --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/DocumentLayout.backup.json @@ -0,0 +1,166 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\src\\customadaptor.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\src\\customadaptor.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 2, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "CustomAdaptor.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\CustomAdaptor.ts", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\src\\CustomAdaptor.ts", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\CustomAdaptor.ts", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\src\\CustomAdaptor.ts", + "ViewState": "AgIAAC0AAAAAAAAAAAAAwDsAAAAFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-03T07:09:13.823Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "tsconfig.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\tsconfig.json", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\src\\tsconfig.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\tsconfig.json", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\src\\tsconfig.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAADAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T07:04:25.506Z" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "index.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\index.ts", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\src\\index.ts", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\index.ts", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\src\\index.ts", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACAAAAADAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-03T07:00:38.994Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "index.html", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\index.html", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\src\\index.html", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\index.html", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\src\\index.html", + "ViewState": "AgIAAAoAAAAAAAAAAAAAABMAAAByAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|", + "WhenOpened": "2025-04-03T07:00:28.218Z" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "webpack.config.js", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\webpack.config.js", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\webpack.config.js", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\webpack.config.js", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\webpack.config.js", + "ViewState": "AgIAABgAAAAAAAAAAAAAABQAAAAOAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|", + "WhenOpened": "2025-04-03T06:59:34.024Z" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "package.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\package.json", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\package.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\package.json", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\package.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAEAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T06:57:54.252Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "GridController.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Controllers\\GridController.cs", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\Controllers\\GridController.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Controllers\\GridController.cs", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\Controllers\\GridController.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAABFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-03T06:45:05.849Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "launchSettings.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Properties\\launchSettings.json", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\Properties\\launchSettings.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Properties\\launchSettings.json", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\Properties\\launchSettings.json", + "ViewState": "AgIAAAkAAAAAAAAAAAAAABkAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T06:44:12.762Z" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "Program.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Program.cs", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\Program.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Program.cs", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAAVAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-03T06:43:30.491Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/DocumentLayout.json b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/DocumentLayout.json new file mode 100644 index 0000000..a9a1bd3 --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/CustomAdaptor_EntityFramework/v17/DocumentLayout.json @@ -0,0 +1,165 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\src\\customadaptor.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\src\\customadaptor.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and customadaptor\\customadaptor_entityframework\\customadaptor_entityframework\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}|CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework.csproj|solutionrelative:customadaptor_entityframework\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 2, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "CustomAdaptor.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\CustomAdaptor.ts", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\src\\CustomAdaptor.ts", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\CustomAdaptor.ts", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\src\\CustomAdaptor.ts", + "ViewState": "AgIAAC0AAAAAAAAAAAAAwDsAAAAFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-03T07:09:13.823Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "tsconfig.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\tsconfig.json", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\src\\tsconfig.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\tsconfig.json", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\src\\tsconfig.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAADAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T07:04:25.506Z" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "index.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\index.ts", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\src\\index.ts", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\index.ts", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\src\\index.ts", + "ViewState": "AgIAAAkAAAAAAAAAAAAAAB8AAAAPAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-03T07:00:38.994Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "index.html", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\index.html", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\src\\index.html", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\src\\index.html", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\src\\index.html", + "ViewState": "AgIAAAoAAAAAAAAAAAAAABMAAAByAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|", + "WhenOpened": "2025-04-03T07:00:28.218Z" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "webpack.config.js", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\webpack.config.js", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\webpack.config.js", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\webpack.config.js", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\webpack.config.js", + "ViewState": "AgIAABgAAAAAAAAAAAAAABQAAAAOAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|", + "WhenOpened": "2025-04-03T06:59:34.024Z" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "package.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\package.json", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\package.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\package.json", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\package.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAEAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T06:57:54.252Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "GridController.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Controllers\\GridController.cs", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\Controllers\\GridController.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Controllers\\GridController.cs", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\Controllers\\GridController.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAABFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-03T06:45:05.849Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "launchSettings.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Properties\\launchSettings.json", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\Properties\\launchSettings.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Properties\\launchSettings.json", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\Properties\\launchSettings.json", + "ViewState": "AgIAAAkAAAAAAAAAAAAAABkAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T06:44:12.762Z" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "Program.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Program.cs", + "RelativeDocumentMoniker": "CustomAdaptor_EntityFramework\\Program.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and CustomAdaptor\\CustomAdaptor_EntityFramework\\CustomAdaptor_EntityFramework\\Program.cs", + "RelativeToolTip": "CustomAdaptor_EntityFramework\\Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAAVAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-03T06:43:30.491Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/ProjectEvaluation/customadaptor_entityframework.metadata.v9.bin b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/ProjectEvaluation/customadaptor_entityframework.metadata.v9.bin new file mode 100644 index 0000000..b1cd48d Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/ProjectEvaluation/customadaptor_entityframework.metadata.v9.bin differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/ProjectEvaluation/customadaptor_entityframework.projects.v9.bin b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/ProjectEvaluation/customadaptor_entityframework.projects.v9.bin new file mode 100644 index 0000000..c72d807 Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/ProjectEvaluation/customadaptor_entityframework.projects.v9.bin differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/ProjectEvaluation/customadaptor_entityframework.strings.v9.bin b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/ProjectEvaluation/customadaptor_entityframework.strings.v9.bin new file mode 100644 index 0000000..b8b99bf Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/.vs/ProjectEvaluation/customadaptor_entityframework.strings.v9.bin differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.sln b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.sln new file mode 100644 index 0000000..da1f24a --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35818.85 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomAdaptor_EntityFramework", "CustomAdaptor_EntityFramework\CustomAdaptor_EntityFramework.csproj", "{AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD70E4CD-7DDF-4B4D-9722-9B84533FEA92}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {826446D9-5622-41FC-9C36-31A0E8F870DC} + EndGlobalSection +EndGlobal diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/App_Data/NORTHWIND.MDF b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/App_Data/NORTHWIND.MDF new file mode 100644 index 0000000..fb95ebe Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/App_Data/NORTHWIND.MDF differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/App_Data/NORTHWIND_log.ldf b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/App_Data/NORTHWIND_log.ldf new file mode 100644 index 0000000..5409b90 Binary files /dev/null and b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/App_Data/NORTHWIND_log.ldf differ diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Controllers/GridController.cs b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Controllers/GridController.cs new file mode 100644 index 0000000..25c61e3 --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Controllers/GridController.cs @@ -0,0 +1,264 @@ +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Data; +using Syncfusion.EJ2.Base; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Internal; + +namespace CustomAdaptor_EntityFramework.Server.Controllers +{ + [ApiController] + public class GridController : ControllerBase + { + string ConnectionString = @""; + + /// + /// Processes the DataManager request to perform searching, filtering, sorting, and paging operations. + /// + /// Contains the details of the data operation requested. + /// Returns a JSON object with the filtered, sorted, and paginated data along with the total record count. + [HttpPost] + [Route("api/[controller]")] + public object Post([FromBody] DataManagerRequest DataManagerRequest) + { + // Retrieve data from the data source (e.g., database). + IQueryable DataSource = GetOrderData().AsQueryable(); + + // Initialize QueryableOperation instance. + QueryableOperation queryableOperation = new QueryableOperation(); + + // Handling searching operation. + if (DataManagerRequest.Search != null && DataManagerRequest.Search.Count > 0) + { + DataSource = queryableOperation.PerformSearching(DataSource, DataManagerRequest.Search); + // Add custom logic here if needed and remove above method. + } + + // Handling filtering operation. + if (DataManagerRequest.Where != null && DataManagerRequest.Where.Count > 0) + { + foreach (WhereFilter condition in DataManagerRequest.Where) + { + foreach (WhereFilter predicate in condition.predicates) + { + DataSource = queryableOperation.PerformFiltering(DataSource, DataManagerRequest.Where, predicate.Operator); + // Add custom logic here if needed and remove above method. + } + } + } + + // Handling sorting operation. + if (DataManagerRequest.Sorted != null && DataManagerRequest.Sorted.Count > 0) + { + DataSource = queryableOperation.PerformSorting(DataSource, DataManagerRequest.Sorted); + // Add custom logic here if needed and remove above method. + } + + // Get the total count of records. + int totalRecordsCount = DataSource.Count(); + + // Handling paging operation. + if (DataManagerRequest.Skip != 0) + { + DataSource = queryableOperation.PerformSkip(DataSource, DataManagerRequest.Skip); + // Add custom logic here if needed and remove above method. + } + if (DataManagerRequest.Take != 0) + { + DataSource = queryableOperation.PerformTake(DataSource, DataManagerRequest.Take); + // Add custom logic here if needed and remove above method. + } + + // Return data based on the request. + return new { result = DataSource, count = totalRecordsCount }; + } + + /// + /// Retrieves the order data from the database. + /// + /// Returns a list of orders fetched from the database. + [HttpGet] + [Route("api/[controller]")] + public List GetOrderData() + { + using (OrderDbContext Context = new OrderDbContext(ConnectionString)) + { + // Retrieve orders from the orders DbSet and convert to list asynchronously. + List orders = Context.Orders.ToList(); + return orders; + } + } + + // Create a class that inherits from DbContext(Entity Framework Core). + public class OrderDbContext : DbContext + { + // Declare a private variable to store the connection string. + private readonly string _ConnectionString; + + // Define a constructor that accepts a connection string. + public OrderDbContext(string ConnectionString) + { + // Store the provided connection string. + _ConnectionString = ConnectionString; + } + + // Override the Onconfiguring method to tell EF Core to use SQL server. + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + // Use the connection string to configure the database connection. + optionsBuilder.UseSqlServer(_ConnectionString); + } + + // Define a DbSet to represent the orders table in the database. + public DbSet Orders { get; set; } + } + + /// + /// Inserts a new data item into the data collection. + /// + /// It contains the new record detail which is need to be inserted. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Insert")] + public void Insert([FromBody] CRUDModel value) + { + using (OrderDbContext Context = new OrderDbContext(ConnectionString)) + { + // Add the provided order to the orders DbSet. + Context.Orders.Add(value.value); + + // Save changes to the database. + Context.SaveChanges(); + } + + // Add custom logic here if needed and remove above method. + } + + /// + /// Update a existing data item from the data collection. + /// + /// It contains the updated record detail which is need to be updated. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Update")] + public void Update([FromBody] CRUDModel value) + { + using (OrderDbContext Context = new OrderDbContext(ConnectionString)) + { + Orders existingOrder = Context.Orders.Find(value.value.OrderID); + if (existingOrder != null) + { + // Update the existing order with the new values. + Context.Entry(existingOrder).CurrentValues.SetValues(value.value); + + // Save changes to the database. + Context.SaveChanges(); + } + } + + // Add custom logic here if needed and remove above method. + } + + /// + /// Remove a specific data item from the data collection. + /// + /// It contains the specific record detail which is need to be removed. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Remove")] + public void Remove([FromBody] CRUDModel value) + { + int OrderId = Convert.ToInt32(value.key.ToString()); + using (OrderDbContext Context = new OrderDbContext(ConnectionString)) + { + Orders Order = Context.Orders.Find(OrderId); + if (Order != null) + { + // Remove the order from the orders DbSet. + Context.Orders.Remove(Order); + + // Save changes to the database. + Context.SaveChanges(); + } + } + + // Add custom logic here if needed and remove above method. + } + + /// + /// Batch update (Insert, Update, and Delete) a collection of data items from the data collection. + /// + /// The set of information along with details about the CRUD actions to be executed from the database. + /// Returns void. + [HttpPost] + [Route("api/[controller]/BatchUpdate")] + public IActionResult BatchUpdate([FromBody] CRUDModel value) + { + using (OrderDbContext Context = new OrderDbContext(ConnectionString)) + { + if (value.changed != null && value.changed.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.changed) + { + // Update the changed records. + Context.Orders.UpdateRange(Record); + } + } + + if (value.added != null && value.added.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.added) + { + foreach (Orders order in value.added) + { + // This ensures EF does not try to insert OrderID. + order.OrderID = default; + } + // Add new records. + Context.Orders.AddRange(value.added); + } + } + + if (value.deleted != null && value.deleted.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.deleted) + { + // Find and delete the records. + Orders ExistingOrder = Context.Orders.Find(Record.OrderID); + if (ExistingOrder != null) + { + Context.Orders.Remove(ExistingOrder); + } + } + } + + // Save changes to the database. + Context.SaveChanges(); + } + return new JsonResult(value); + } + + public class CRUDModel where T : class + { + public string? action { get; set; } + public string? keyColumn { get; set; } + public object? key { get; set; } + public T? value { get; set; } + public List? added { get; set; } + public List? changed { get; set; } + public List? deleted { get; set; } + public IDictionary? @params { get; set; } + } + + public class Orders + { + [Key] + public int? OrderID { get; set; } + public string? CustomerID { get; set; } + public int? EmployeeID { get; set; } + public decimal Freight { get; set; } + public string? ShipCity { get; set; } + } + } +} diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Controllers/WeatherForecastController.cs b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Controllers/WeatherForecastController.cs new file mode 100644 index 0000000..f09f1f3 --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Controllers/WeatherForecastController.cs @@ -0,0 +1,32 @@ +using Microsoft.AspNetCore.Mvc; + +namespace CustomAdaptor_EntityFramework.Controllers; + +[ApiController] +[Route("[controller]")] +public class WeatherForecastController : ControllerBase +{ + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet(Name = "GetWeatherForecast")] + public IEnumerable Get() + { + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = Summaries[Random.Shared.Next(Summaries.Length)] + }) + .ToArray(); + } +} diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.csproj b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.csproj new file mode 100644 index 0000000..d352e3d --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.csproj @@ -0,0 +1,21 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + + diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.csproj.user b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.csproj.user new file mode 100644 index 0000000..9ff5820 --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.csproj.user @@ -0,0 +1,6 @@ + + + + https + + \ No newline at end of file diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.http b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.http new file mode 100644 index 0000000..eb019bf --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework.http @@ -0,0 +1,6 @@ +@CustomAdaptor_EntityFramework_HostAddress = http://localhost:5245 + +GET {{CustomAdaptor_EntityFramework_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Program.cs b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Program.cs new file mode 100644 index 0000000..8841217 --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Program.cs @@ -0,0 +1,26 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} +app.UseDefaultFiles(); +app.UseStaticFiles(); +app.UseHttpsRedirection(); + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Properties/launchSettings.json b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Properties/launchSettings.json new file mode 100644 index 0000000..3af830a --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/Properties/launchSettings.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:32662", + "sslPort": 44300 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:5245", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + //"launchUrl": "swagger", + "applicationUrl": "https://localhost:7136;http://localhost:5245", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/WeatherForecast.cs b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/WeatherForecast.cs new file mode 100644 index 0000000..3dc2748 --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/WeatherForecast.cs @@ -0,0 +1,13 @@ +namespace CustomAdaptor_EntityFramework +{ + public class WeatherForecast + { + public DateOnly Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string? Summary { get; set; } + } +} diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/appsettings.Development.json b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/appsettings.json b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/package.json b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/package.json new file mode 100644 index 0000000..d8cefed --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/package.json @@ -0,0 +1,29 @@ +{ + "name": "customadaptor_entityframework", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "build": "webpack --mode=development --watch", + "release": "webpack --mode=production", + "publish": "npm run release && dotnet publish -c Release" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "devDependencies": { + "clean-webpack-plugin": "4.0.0", + "css-loader": "7.1.2", + "html-webpack-plugin": "5.6.3", + "mini-css-extract-plugin": "2.9.2", + "ts-loader": "9.5.2", + "typescript": "5.8.2", + "webpack": "5.98.0", + "webpack-cli": "6.0.1" + }, + "dependencies": { + "@syncfusion/ej2-data": "^29.1.33", + "@syncfusion/ej2-grids": "^29.1.35", + "@types/node": "^22.14.0" + } +} diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/CustomAdaptor.ts b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/CustomAdaptor.ts new file mode 100644 index 0000000..29e98fe --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/CustomAdaptor.ts @@ -0,0 +1,61 @@ +import { UrlAdaptor } from '@syncfusion/ej2-data'; + +export class CustomAdaptor extends UrlAdaptor { + public override processResponse(): any { + // Calling base class processResponse function. + const original: any = super.processResponse.apply(this, arguments as any); + return original; + } + + public override insert(dm: any, data: any): any { + return { + url: dm.dataSource.insertUrl || dm.dataSource.url, + data: JSON.stringify({ + __RequestVerificationToken: "Syncfusion", + value: data, + action: 'insert' + }), + type: 'POST' + }; + } + + public override update(dm: any, keyField: string, value: any): any { + return { + url: dm.dataSource.updateUrl || dm.dataSource.url, + data: JSON.stringify({ + __RequestVerificationToken: "Syncfusion", + value: value, + action: 'update' + }), + type: 'POST' + }; + } + + public override remove(dm: any, keyField: string, value: any): any { + return { + url: dm.dataSource.removeUrl || dm.dataSource.url, + data: JSON.stringify({ + __RequestVerificationToken: "Syncfusion", + key: value, + keyColumn: keyField, + action: 'remove' + }), + type: 'POST' + }; + } + + public override batchRequest(dm: any, changes: any, e: any, query: any, original?: Object): Object { + return { + url: dm.dataSource.batchUrl || dm.dataSource.url, + data: JSON.stringify({ + __RequestVerificationToken: "Syncfusion", + added: changes.addedRecords, + changed: changes.changedRecords, + deleted: changes.deletedRecords, + key: e.key, + action: 'batch' + }), + type: 'POST' + }; + } +} \ No newline at end of file diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/index.html b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/index.html new file mode 100644 index 0000000..022d216 --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/index.html @@ -0,0 +1,31 @@ + + + + EJ2 Grid + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/index.ts b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/index.ts new file mode 100644 index 0000000..15b6a1e --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/index.ts @@ -0,0 +1,35 @@ +import { Grid, Toolbar, Filter, Sort, Group, Page, Edit } from '@syncfusion/ej2-grids'; +import { DataManager } from '@syncfusion/ej2-data'; +import { CustomAdaptor } from './CustomAdaptor'; + +Grid.Inject(Toolbar, Filter, Sort, Group, Page, Edit); + +let data: DataManager = new DataManager({ + url: 'https://localhost:xxxx/api/Grid', + insertUrl: 'https://localhost:xxxx/api/Grid/Insert', + updateUrl: 'https://localhost:xxxx/api/Grid/Update', + removeUrl: 'https://localhost:xxxx/api/Grid/Remove', + // Enable batch URL when batch editing is enabled. + // batchUrl: 'https://localhost:xxxx/api/Grid/BatchUpdate', + adaptor: new CustomAdaptor() +}); + +let grid: Grid = new Grid({ + dataSource: data, + allowGrouping: true, + allowFiltering: true, + allowSorting: true, + allowPaging: true, + toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel', 'Search'], + editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true }, + columns: [ + { field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 100, isPrimaryKey: true, isIdentity: true }, + { field: 'CustomerID', headerText: 'Customer ID', validationRules: { required: true }, width: 100 }, + { field: 'EmployeeID', headerText: 'Employee ID', validationRules: { required: true, number: true }, width: 100 }, + { field: 'Freight', headerText: 'Freight', validationRules: { required: true, min: 1, max: 1000 }, textAlign: 'Right', width: 100 }, + { field: 'ShipCity', headerText: 'Ship City', validationRules: { required: true }, textAlign: 'Right', width: 120 } + ], + height: 348 +}); + +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/tsconfig.json b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/tsconfig.json new file mode 100644 index 0000000..344e4dd --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/src/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "noEmitOnError": true, + "removeComments": false, + "sourceMap": true, + "target": "es5" + }, + "exclude": [ + "node_modules", + "wwwroot" + ] +} \ No newline at end of file diff --git a/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/webpack.config.js b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/webpack.config.js new file mode 100644 index 0000000..cc2de70 --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/CustomAdaptor_EntityFramework/CustomAdaptor_EntityFramework/webpack.config.js @@ -0,0 +1,37 @@ +const path = require("path"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const { CleanWebpackPlugin } = require("clean-webpack-plugin"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + entry: "./src/index.ts", + output: { + path: path.resolve(__dirname, "wwwroot"), + filename: "[name].[chunkhash].js", + publicPath: "/", + }, + resolve: { + extensions: [".js", ".ts"], + }, + module: { + rules: [ + { + test: /\.ts$/, + use: "ts-loader", + }, + { + test: /\.css$/, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, + plugins: [ + new CleanWebpackPlugin(), + new HtmlWebpackPlugin({ + template: "./src/index.html", + }), + new MiniCssExtractPlugin({ + filename: "css/[name].[chunkhash].css", + }), + ], +}; \ No newline at end of file diff --git a/Binding SQL database using EF and CustomAdaptor/README.md b/Binding SQL database using EF and CustomAdaptor/README.md new file mode 100644 index 0000000..7223517 --- /dev/null +++ b/Binding SQL database using EF and CustomAdaptor/README.md @@ -0,0 +1,20 @@ +## TypeScript Grid SQL Server connectivity using Entity Framework and CustomAdaptor + +A project that enables data binding and CRUD action handling in the Syncfusion TypeScript Grid to a SQL Server connectivity using Entity Framework and CustomAdaptor feature of the Grid. + +## Steps to Run the Sample + +1. Download or unzip the project and open the project in **Visual Studio 2022**. + +2. Replace the connected database's connection string in the `GridController.cs` file. + +3. In the TypeScript client project, open `src/index.ts` and replace the port number in the API URL where it says `xxxx` with the actual backend server port. + +4. Navigate to the client project folder and run the following command: + + ```bash + npm install + ``` +5. Build the project to restore dependencies and compile it. + +6. Run the project. \ No newline at end of file diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/DesignTimeBuild/.dtbcache.v2 b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..0828423 Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/DesignTimeBuild/.dtbcache.v2 differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/5744c7d2-e140-4ee5-9bb3-22266d952a8c.vsidx b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/5744c7d2-e140-4ee5-9bb3-22266d952a8c.vsidx new file mode 100644 index 0000000..300bb36 Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/5744c7d2-e140-4ee5-9bb3-22266d952a8c.vsidx differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/63829b2a-3357-447e-a069-2de912082af8.vsidx b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/63829b2a-3357-447e-a069-2de912082af8.vsidx new file mode 100644 index 0000000..7b52f5d Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/63829b2a-3357-447e-a069-2de912082af8.vsidx differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/6d58489f-e756-42ab-bc1f-9819b21d65ab.vsidx b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/6d58489f-e756-42ab-bc1f-9819b21d65ab.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/6d58489f-e756-42ab-bc1f-9819b21d65ab.vsidx differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/fbe3667f-b305-414b-96e1-69b21dedc828.vsidx b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/fbe3667f-b305-414b-96e1-69b21dedc828.vsidx new file mode 100644 index 0000000..f964f12 Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/fbe3667f-b305-414b-96e1-69b21dedc828.vsidx differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/fe1c8069-d8c3-4648-b1b4-081bfd52a7b7.vsidx b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/fe1c8069-d8c3-4648-b1b4-081bfd52a7b7.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/FileContentIndex/fe1c8069-d8c3-4648-b1b4-081bfd52a7b7.vsidx differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/config/applicationhost.config b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/config/applicationhost.config new file mode 100644 index 0000000..0d88f0d --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/config/applicationhost.config @@ -0,0 +1,1016 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/.futdcache.v2 b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/.futdcache.v2 new file mode 100644 index 0000000..48f4239 Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/.futdcache.v2 differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/.suo b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/.suo new file mode 100644 index 0000000..0405a75 Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/.suo differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/DocumentLayout.backup.json b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..c4a8944 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/DocumentLayout.backup.json @@ -0,0 +1,150 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 1, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "tsconfig.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\tsconfig.json", + "RelativeDocumentMoniker": "Grid_EntityFramework\\src\\tsconfig.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\tsconfig.json", + "RelativeToolTip": "Grid_EntityFramework\\src\\tsconfig.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T05:55:23.614Z" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "index.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\index.ts", + "RelativeDocumentMoniker": "Grid_EntityFramework\\src\\index.ts", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\index.ts", + "RelativeToolTip": "Grid_EntityFramework\\src\\index.ts", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAnAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-03T05:50:55.331Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "index.html", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\index.html", + "RelativeDocumentMoniker": "Grid_EntityFramework\\src\\index.html", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\index.html", + "RelativeToolTip": "Grid_EntityFramework\\src\\index.html", + "ViewState": "AgIAAAwAAAAAAAAAAAAwwB4AAAAHAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|", + "WhenOpened": "2025-04-03T05:50:45.173Z" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "webpack.config.js", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\webpack.config.js", + "RelativeDocumentMoniker": "Grid_EntityFramework\\webpack.config.js", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\webpack.config.js", + "RelativeToolTip": "Grid_EntityFramework\\webpack.config.js", + "ViewState": "AgIAABEAAAAAAAAAAAAgwCAAAAAiAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|", + "WhenOpened": "2025-04-03T05:50:09.23Z" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "package.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\package.json", + "RelativeDocumentMoniker": "Grid_EntityFramework\\package.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\package.json", + "RelativeToolTip": "Grid_EntityFramework\\package.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAQAAAACAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T05:48:51.411Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "GridController.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Controllers\\GridController.cs", + "RelativeDocumentMoniker": "Grid_EntityFramework\\Controllers\\GridController.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Controllers\\GridController.cs", + "RelativeToolTip": "Grid_EntityFramework\\Controllers\\GridController.cs", + "ViewState": "AgIAAH0AAAAAAAAAAAAAAA0AAABFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-03T05:31:34.08Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "Program.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Program.cs", + "RelativeDocumentMoniker": "Grid_EntityFramework\\Program.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Program.cs", + "RelativeToolTip": "Grid_EntityFramework\\Program.cs", + "ViewState": "AgIAAAYAAAAAAAAAAAAAABEAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-03T05:30:23.411Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "launchSettings.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Properties\\launchSettings.json", + "RelativeDocumentMoniker": "Grid_EntityFramework\\Properties\\launchSettings.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Properties\\launchSettings.json", + "RelativeToolTip": "Grid_EntityFramework\\Properties\\launchSettings.json", + "ViewState": "AgIAAAwAAAAAAAAAAAAAABgAAAAcAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T04:55:01.252Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/DocumentLayout.json b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/DocumentLayout.json new file mode 100644 index 0000000..abe45eb --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/DocumentLayout.json @@ -0,0 +1,149 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\src\\index.ts||{0F2454B1-A556-402D-A7D0-1FDE7F99DEE0}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\controllers\\gridcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\package.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\src\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\src\\tsconfig.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|d:\\component\\ej2\\ts\\connecting-databases-typescript-grid\\binding sql database using ef and urladaptor\\grid_entityframework\\grid_entityframework\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}", + "RelativeMoniker": "D:0:0:{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}|Grid_EntityFramework\\Grid_EntityFramework.csproj|solutionrelative:grid_entityframework\\webpack.config.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 1, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "tsconfig.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\tsconfig.json", + "RelativeDocumentMoniker": "Grid_EntityFramework\\src\\tsconfig.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\tsconfig.json", + "RelativeToolTip": "Grid_EntityFramework\\src\\tsconfig.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T05:55:23.614Z" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "index.ts", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\index.ts", + "RelativeDocumentMoniker": "Grid_EntityFramework\\src\\index.ts", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\index.ts", + "RelativeToolTip": "Grid_EntityFramework\\src\\index.ts", + "ViewState": "AgIAABUAAAAAAAAAAAAAAB4AAAAPAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003213|", + "WhenOpened": "2025-04-03T05:50:55.331Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "index.html", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\index.html", + "RelativeDocumentMoniker": "Grid_EntityFramework\\src\\index.html", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\src\\index.html", + "RelativeToolTip": "Grid_EntityFramework\\src\\index.html", + "ViewState": "AgIAAAwAAAAAAAAAAAAwwB4AAAAHAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|", + "WhenOpened": "2025-04-03T05:50:45.173Z" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "webpack.config.js", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\webpack.config.js", + "RelativeDocumentMoniker": "Grid_EntityFramework\\webpack.config.js", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\webpack.config.js", + "RelativeToolTip": "Grid_EntityFramework\\webpack.config.js", + "ViewState": "AgIAABEAAAAAAAAAAAAgwCAAAAAiAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|", + "WhenOpened": "2025-04-03T05:50:09.23Z" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "package.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\package.json", + "RelativeDocumentMoniker": "Grid_EntityFramework\\package.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\package.json", + "RelativeToolTip": "Grid_EntityFramework\\package.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAQAAAACAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T05:48:51.411Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "GridController.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Controllers\\GridController.cs", + "RelativeDocumentMoniker": "Grid_EntityFramework\\Controllers\\GridController.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Controllers\\GridController.cs", + "RelativeToolTip": "Grid_EntityFramework\\Controllers\\GridController.cs", + "ViewState": "AgIAAH0AAAAAAAAAAAAAAA0AAABFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-03T05:31:34.08Z" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "Program.cs", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Program.cs", + "RelativeDocumentMoniker": "Grid_EntityFramework\\Program.cs", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Program.cs", + "RelativeToolTip": "Grid_EntityFramework\\Program.cs", + "ViewState": "AgIAAAYAAAAAAAAAAAAAABEAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-04-03T05:30:23.411Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "launchSettings.json", + "DocumentMoniker": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Properties\\launchSettings.json", + "RelativeDocumentMoniker": "Grid_EntityFramework\\Properties\\launchSettings.json", + "ToolTip": "D:\\Component\\EJ2\\TS\\connecting-databases-typescript-grid\\Binding SQL database using EF and UrlAdaptor\\Grid_EntityFramework\\Grid_EntityFramework\\Properties\\launchSettings.json", + "RelativeToolTip": "Grid_EntityFramework\\Properties\\launchSettings.json", + "ViewState": "AgIAAAwAAAAAAAAAAAAAABgAAAAcAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-04-03T04:55:01.252Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/fileList.bin b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/fileList.bin new file mode 100644 index 0000000..42d83be Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/Grid_EntityFramework/v17/fileList.bin differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/ProjectEvaluation/grid_entityframework.metadata.v9.bin b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/ProjectEvaluation/grid_entityframework.metadata.v9.bin new file mode 100644 index 0000000..9e86527 Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/ProjectEvaluation/grid_entityframework.metadata.v9.bin differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/ProjectEvaluation/grid_entityframework.projects.v9.bin b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/ProjectEvaluation/grid_entityframework.projects.v9.bin new file mode 100644 index 0000000..e17efd9 Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/ProjectEvaluation/grid_entityframework.projects.v9.bin differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/ProjectEvaluation/grid_entityframework.strings.v9.bin b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/ProjectEvaluation/grid_entityframework.strings.v9.bin new file mode 100644 index 0000000..30b5840 Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/.vs/ProjectEvaluation/grid_entityframework.strings.v9.bin differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework.sln b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework.sln new file mode 100644 index 0000000..ced6678 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35818.85 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grid_EntityFramework", "Grid_EntityFramework\Grid_EntityFramework.csproj", "{F608DEAE-841C-4844-9BDB-0F5992E0AAA1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F608DEAE-841C-4844-9BDB-0F5992E0AAA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F608DEAE-841C-4844-9BDB-0F5992E0AAA1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F608DEAE-841C-4844-9BDB-0F5992E0AAA1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F608DEAE-841C-4844-9BDB-0F5992E0AAA1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A52EF179-F819-407D-ADF7-462C8C780046} + EndGlobalSection +EndGlobal diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/App_Data/NORTHWIND.MDF b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/App_Data/NORTHWIND.MDF new file mode 100644 index 0000000..bc42a65 Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/App_Data/NORTHWIND.MDF differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/App_Data/NORTHWIND_log.ldf b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/App_Data/NORTHWIND_log.ldf new file mode 100644 index 0000000..6967c3e Binary files /dev/null and b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/App_Data/NORTHWIND_log.ldf differ diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Controllers/GridController.cs b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Controllers/GridController.cs new file mode 100644 index 0000000..4b5da73 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Controllers/GridController.cs @@ -0,0 +1,264 @@ +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Data; +using Syncfusion.EJ2.Base; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Internal; + +namespace Grid_EntityFramework.Server.Controllers +{ + [ApiController] + public class GridController : ControllerBase + { + string ConnectionString = @""; + + /// + /// Processes the DataManager request to perform searching, filtering, sorting, and paging operations. + /// + /// Contains the details of the data operation requested. + /// Returns a JSON object with the filtered, sorted, and paginated data along with the total record count. + [HttpPost] + [Route("api/[controller]")] + public object Post([FromBody] DataManagerRequest DataManagerRequest) + { + // Retrieve data from the data source (e.g., database). + IQueryable DataSource = GetOrderData().AsQueryable(); + + // Initialize QueryableOperation instance. + QueryableOperation queryableOperation = new QueryableOperation(); + + // Handling searching operation. + if (DataManagerRequest.Search != null && DataManagerRequest.Search.Count > 0) + { + DataSource = queryableOperation.PerformSearching(DataSource, DataManagerRequest.Search); + // Add custom logic here if needed and remove above method. + } + + // Handling filtering operation. + if (DataManagerRequest.Where != null && DataManagerRequest.Where.Count > 0) + { + foreach (WhereFilter condition in DataManagerRequest.Where) + { + foreach (WhereFilter predicate in condition.predicates) + { + DataSource = queryableOperation.PerformFiltering(DataSource, DataManagerRequest.Where, predicate.Operator); + // Add custom logic here if needed and remove above method. + } + } + } + + // Handling sorting operation. + if (DataManagerRequest.Sorted != null && DataManagerRequest.Sorted.Count > 0) + { + DataSource = queryableOperation.PerformSorting(DataSource, DataManagerRequest.Sorted); + // Add custom logic here if needed and remove above method. + } + + // Get the total count of records. + int totalRecordsCount = DataSource.Count(); + + // Handling paging operation. + if (DataManagerRequest.Skip != 0) + { + DataSource = queryableOperation.PerformSkip(DataSource, DataManagerRequest.Skip); + // Add custom logic here if needed and remove above method. + } + if (DataManagerRequest.Take != 0) + { + DataSource = queryableOperation.PerformTake(DataSource, DataManagerRequest.Take); + // Add custom logic here if needed and remove above method. + } + + // Return data based on the request. + return new { result = DataSource, count = totalRecordsCount }; + } + + /// + /// Retrieves the order data from the database. + /// + /// Returns a list of orders fetched from the database. + [HttpGet] + [Route("api/[controller]")] + public List GetOrderData() + { + using (OrderDbContext Context = new OrderDbContext(ConnectionString)) + { + // Retrieve orders from the orders DbSet and convert to list asynchronously. + List orders = Context.Orders.ToList(); + return orders; + } + } + + // Create a class that inherits from DbContext(Entity Framework Core). + public class OrderDbContext : DbContext + { + // Declare a private variable to store the connection string. + private readonly string _ConnectionString; + + // Define a constructor that accepts a connection string. + public OrderDbContext(string ConnectionString) + { + // Store the provided connection string. + _ConnectionString = ConnectionString; + } + + // Override the Onconfiguring method to tell EF Core to use SQL server. + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + // Use the connection string to configure the database connection. + optionsBuilder.UseSqlServer(_ConnectionString); + } + + // Define a DbSet to represent the orders table in the database. + public DbSet Orders { get; set; } + } + + /// + /// Inserts a new data item into the data collection. + /// + /// It contains the new record detail which is need to be inserted. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Insert")] + public void Insert([FromBody] CRUDModel value) + { + using (OrderDbContext Context = new OrderDbContext(ConnectionString)) + { + // Add the provided order to the orders DbSet. + Context.Orders.Add(value.value); + + // Save changes to the database. + Context.SaveChanges(); + } + + // Add custom logic here if needed and remove above method. + } + + /// + /// Update a existing data item from the data collection. + /// + /// It contains the updated record detail which is need to be updated. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Update")] + public void Update([FromBody] CRUDModel value) + { + using (OrderDbContext Context = new OrderDbContext(ConnectionString)) + { + Orders existingOrder = Context.Orders.Find(value.value.OrderID); + if (existingOrder != null) + { + // Update the existing order with the new values. + Context.Entry(existingOrder).CurrentValues.SetValues(value.value); + + // Save changes to the database. + Context.SaveChanges(); + } + } + + // Add custom logic here if needed and remove above method. + } + + /// + /// Remove a specific data item from the data collection. + /// + /// It contains the specific record detail which is need to be removed. + /// Returns void. + [HttpPost] + [Route("api/[controller]/Remove")] + public void Remove([FromBody] CRUDModel value) + { + int OrderId = Convert.ToInt32(value.key.ToString()); + using (OrderDbContext Context = new OrderDbContext(ConnectionString)) + { + Orders Order = Context.Orders.Find(OrderId); + if (Order != null) + { + // Remove the order from the orders DbSet. + Context.Orders.Remove(Order); + + // Save changes to the database. + Context.SaveChanges(); + } + } + + // Add custom logic here if needed and remove above method. + } + + /// + /// Batch update (Insert, Update, and Delete) a collection of data items from the data collection. + /// + /// The set of information along with details about the CRUD actions to be executed from the database. + /// Returns void. + [HttpPost] + [Route("api/[controller]/BatchUpdate")] + public IActionResult BatchUpdate([FromBody] CRUDModel value) + { + using (OrderDbContext Context = new OrderDbContext(ConnectionString)) + { + if (value.changed != null && value.changed.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.changed) + { + // Update the changed records. + Context.Orders.UpdateRange(Record); + } + } + + if (value.added != null && value.added.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.added) + { + foreach (Orders order in value.added) + { + // This ensures EF does not try to insert OrderID. + order.OrderID = default; + } + // Add new records. + Context.Orders.AddRange(value.added); + } + } + + if (value.deleted != null && value.deleted.Count > 0) + { + foreach (Orders Record in (IEnumerable)value.deleted) + { + // Find and delete the records. + Orders ExistingOrder = Context.Orders.Find(Record.OrderID); + if (ExistingOrder != null) + { + Context.Orders.Remove(ExistingOrder); + } + } + } + + // Save changes to the database. + Context.SaveChanges(); + } + return new JsonResult(value); + } + + public class CRUDModel where T : class + { + public string? action { get; set; } + public string? keyColumn { get; set; } + public object? key { get; set; } + public T? value { get; set; } + public List? added { get; set; } + public List? changed { get; set; } + public List? deleted { get; set; } + public IDictionary? @params { get; set; } + } + + public class Orders + { + [Key] + public int? OrderID { get; set; } + public string? CustomerID { get; set; } + public int? EmployeeID { get; set; } + public decimal Freight { get; set; } + public string? ShipCity { get; set; } + } + } +} diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Controllers/WeatherForecastController.cs b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Controllers/WeatherForecastController.cs new file mode 100644 index 0000000..9a05768 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Controllers/WeatherForecastController.cs @@ -0,0 +1,32 @@ +using Microsoft.AspNetCore.Mvc; + +namespace Grid_EntityFramework.Controllers; + +[ApiController] +[Route("[controller]")] +public class WeatherForecastController : ControllerBase +{ + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet(Name = "GetWeatherForecast")] + public IEnumerable Get() + { + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = Summaries[Random.Shared.Next(Summaries.Length)] + }) + .ToArray(); + } +} diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Grid_EntityFramework.csproj b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Grid_EntityFramework.csproj new file mode 100644 index 0000000..f69622a --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Grid_EntityFramework.csproj @@ -0,0 +1,25 @@ + + + + net8.0 + enable + enable + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Grid_EntityFramework.csproj.user b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Grid_EntityFramework.csproj.user new file mode 100644 index 0000000..9ff5820 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Grid_EntityFramework.csproj.user @@ -0,0 +1,6 @@ + + + + https + + \ No newline at end of file diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Grid_EntityFramework.http b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Grid_EntityFramework.http new file mode 100644 index 0000000..148cfc5 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Grid_EntityFramework.http @@ -0,0 +1,6 @@ +@Grid_EntityFramework_HostAddress = http://localhost:5186 + +GET {{Grid_EntityFramework_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Program.cs b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Program.cs new file mode 100644 index 0000000..8841217 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Program.cs @@ -0,0 +1,26 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} +app.UseDefaultFiles(); +app.UseStaticFiles(); +app.UseHttpsRedirection(); + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Properties/launchSettings.json b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Properties/launchSettings.json new file mode 100644 index 0000000..9386543 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/Properties/launchSettings.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:29671", + "sslPort": 44355 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + //"launchUrl": "swagger", + "applicationUrl": "http://localhost:5186", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + //"launchUrl": "swagger", + "applicationUrl": "https://localhost:7141;http://localhost:5186", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/WeatherForecast.cs b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/WeatherForecast.cs new file mode 100644 index 0000000..11fd463 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/WeatherForecast.cs @@ -0,0 +1,13 @@ +namespace Grid_EntityFramework +{ + public class WeatherForecast + { + public DateOnly Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string? Summary { get; set; } + } +} diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/appsettings.Development.json b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/appsettings.json b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/package.json b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/package.json new file mode 100644 index 0000000..725715a --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/package.json @@ -0,0 +1,29 @@ +{ + "name": "grid_entityframework", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "build": "webpack --mode=development --watch", + "release": "webpack --mode=production", + "publish": "npm run release && dotnet publish -c Release" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "devDependencies": { + "clean-webpack-plugin": "4.0.0", + "css-loader": "7.1.2", + "html-webpack-plugin": "5.6.3", + "mini-css-extract-plugin": "2.9.2", + "ts-loader": "9.5.2", + "typescript": "5.8.2", + "webpack": "5.98.0", + "webpack-cli": "6.0.1" + }, + "dependencies": { + "@syncfusion/ej2-data": "^29.1.33", + "@syncfusion/ej2-grids": "^29.1.35", + "@types/node": "^22.14.0" + } +} diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.html b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.html new file mode 100644 index 0000000..022d216 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.html @@ -0,0 +1,31 @@ + + + + EJ2 Grid + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.js b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.js new file mode 100644 index 0000000..fb95e7a --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var ej2_grids_1 = require("@syncfusion/ej2-grids"); +var ej2_data_1 = require("@syncfusion/ej2-data"); +ej2_grids_1.Grid.Inject(ej2_grids_1.Toolbar, ej2_grids_1.Filter, ej2_grids_1.Sort, ej2_grids_1.Group, ej2_grids_1.Page, ej2_grids_1.Edit); +var data = new ej2_data_1.DataManager({ + url: 'https://localhost:7141/api/Grid', + insertUrl: 'https://localhost:7141/api/Grid/Insert', + updateUrl: 'https://localhost:7141/api/Grid/Update', + removeUrl: 'https://localhost:7141/api/Grid/Remove', + // Enable batch URL when batch editing is enabled. + //batchUrl: 'https://localhost:7141/api/Grid/BatchUpdate', + adaptor: new ej2_data_1.UrlAdaptor() +}); +var grid = new ej2_grids_1.Grid({ + dataSource: data, + allowGrouping: true, + allowFiltering: true, + allowSorting: true, + allowPaging: true, + toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel', 'Search'], + editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true }, + columns: [ + { field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 100, isPrimaryKey: true, isIdentity: true, type: 'number' }, + { field: 'CustomerID', headerText: 'Customer ID', validationRules: { required: true }, type: 'string', width: 100 }, + { field: 'EmployeeID', headerText: 'Employee ID', validationRules: { required: true, number: true }, width: 100 }, + { field: 'Freight', headerText: 'Freight', validationRules: { required: true, min: 1, max: 1000 }, textAlign: 'Right', width: 100 }, + { field: 'ShipCity', headerText: 'Ship City', validationRules: { required: true }, textAlign: 'Right', width: 120 } + ], + height: 250 +}); +grid.appendTo('#Grid'); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.js.map b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.js.map new file mode 100644 index 0000000..15dd756 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAAA,mDAAuF;AACvF,iDAA+D;AAE/D,gBAAI,CAAC,MAAM,CAAC,mBAAO,EAAE,kBAAM,EAAE,gBAAI,EAAE,iBAAK,EAAE,gBAAI,EAAE,gBAAI,CAAC,CAAC;AAEtD,IAAI,IAAI,GAAgB,IAAI,sBAAW,CAAC;IACpC,GAAG,EAAE,iCAAiC;IACtC,SAAS,EAAE,wCAAwC;IACnD,SAAS,EAAE,wCAAwC;IACnD,SAAS,EAAE,wCAAwC;IACnD,kDAAkD;IAClD,0DAA0D;IAC1D,OAAO,EAAE,IAAI,qBAAU,EAAE;CAC5B,CAAC,CAAC;AAEH,IAAI,IAAI,GAAS,IAAI,gBAAI,CAAC;IACtB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,IAAI;IAClB,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;IAChE,YAAY,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC5E,OAAO,EAAE;QACL,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClI,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;QACnH,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;QACjH,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE;QACnI,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE;KACtH;IACD,MAAM,EAAE,GAAG;CACd,CAAC,CAAC;AAEH,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.ts b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.ts new file mode 100644 index 0000000..6a1d3a4 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/index.ts @@ -0,0 +1,34 @@ +import { Grid, Toolbar, Filter, Sort, Group, Page, Edit } from '@syncfusion/ej2-grids'; +import { DataManager, UrlAdaptor } from '@syncfusion/ej2-data'; + +Grid.Inject(Toolbar, Filter, Sort, Group, Page, Edit); + +let data: DataManager = new DataManager({ + url: 'https://localhost:xxxx/api/Grid', + insertUrl: 'https://localhost:xxxx/api/Grid/Insert', + updateUrl: 'https://localhost:xxxx/api/Grid/Update', + removeUrl: 'https://localhost:xxxx/api/Grid/Remove', + // Enable batch URL when batch editing is enabled. + //batchUrl: 'https://localhost:xxxx/api/Grid/BatchUpdate', + adaptor: new UrlAdaptor() +}); + +let grid: Grid = new Grid({ + dataSource: data, + allowGrouping: true, + allowFiltering: true, + allowSorting: true, + allowPaging: true, + toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel', 'Search'], + editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true }, + columns: [ + { field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 100, isPrimaryKey: true, isIdentity: true, type: 'number' }, + { field: 'CustomerID', headerText: 'Customer ID', validationRules: { required: true }, type: 'string', width: 100 }, + { field: 'EmployeeID', headerText: 'Employee ID', validationRules: { required: true, number: true }, width: 100 }, + { field: 'Freight', headerText: 'Freight', validationRules: { required: true, min: 1, max: 1000 }, textAlign: 'Right', width: 100 }, + { field: 'ShipCity', headerText: 'Ship City', validationRules: { required: true }, textAlign: 'Right', width: 120 } + ], + height: 348 +}); + +grid.appendTo('#Grid'); \ No newline at end of file diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/tsconfig.json b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/tsconfig.json new file mode 100644 index 0000000..344e4dd --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/src/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "noEmitOnError": true, + "removeComments": false, + "sourceMap": true, + "target": "es5" + }, + "exclude": [ + "node_modules", + "wwwroot" + ] +} \ No newline at end of file diff --git a/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/webpack.config.js b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/webpack.config.js new file mode 100644 index 0000000..cc2de70 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/Grid_EntityFramework/Grid_EntityFramework/webpack.config.js @@ -0,0 +1,37 @@ +const path = require("path"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const { CleanWebpackPlugin } = require("clean-webpack-plugin"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); + +module.exports = { + entry: "./src/index.ts", + output: { + path: path.resolve(__dirname, "wwwroot"), + filename: "[name].[chunkhash].js", + publicPath: "/", + }, + resolve: { + extensions: [".js", ".ts"], + }, + module: { + rules: [ + { + test: /\.ts$/, + use: "ts-loader", + }, + { + test: /\.css$/, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, + plugins: [ + new CleanWebpackPlugin(), + new HtmlWebpackPlugin({ + template: "./src/index.html", + }), + new MiniCssExtractPlugin({ + filename: "css/[name].[chunkhash].css", + }), + ], +}; \ No newline at end of file diff --git a/Binding SQL database using EF and UrlAdaptor/README.md b/Binding SQL database using EF and UrlAdaptor/README.md new file mode 100644 index 0000000..50bab95 --- /dev/null +++ b/Binding SQL database using EF and UrlAdaptor/README.md @@ -0,0 +1,20 @@ +## TypeScript Grid SQL Server connectivity using Entity Framework and UrlAdaptor + +A project that enables data binding and CRUD action handling in the Syncfusion TypeScript Grid to a SQL Server connectivity using Entity Framework and UrlAdaptor feature of the Grid. + +## Steps to Run the Sample + +1. Download or unzip the project and open the project in **Visual Studio 2022**. + +2. Replace the connected database's connection string in the `GridController.cs` file. + +3. In the TypeScript client project, open `src/index.ts` and replace the port number in the API URL where it says `xxxx` with the actual backend server port. + +4. Navigate to the client project folder and run the following command: + + ```bash + npm install + ``` +5. Build the project to restore dependencies and compile it. + +6. Run the project. \ No newline at end of file