Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
62530e2
add out of proc intial steps
MaddyDev Sep 28, 2022
08493f2
rename namespace
MaddyDev Oct 3, 2022
9288e94
update csproj
MaddyDev Oct 3, 2022
d364fd1
add outofproc proj to sln
MaddyDev Oct 4, 2022
b6453d0
Merge branch 'main' into maddy/outofprocSupport
MaddyDev Oct 5, 2022
9c790de
add new samples-outofproc
MaddyDev Oct 5, 2022
61fedc8
remove ci.yml and extensions-ci
MaddyDev Oct 5, 2022
7425d07
update xml
MaddyDev Oct 5, 2022
44450c9
Merge branch 'maddy/outofprocSupport' into maddy/samplesOutofProc
MaddyDev Oct 5, 2022
4461307
samples-outofproc
MaddyDev Oct 12, 2022
ccd08ea
Merge branch 'main' into maddy/outofprocSupport
MaddyDev Oct 12, 2022
ca6b376
undo package lock updates
MaddyDev Oct 12, 2022
ea94c29
clean up urls
MaddyDev Oct 12, 2022
b551b08
update comments
MaddyDev Oct 12, 2022
d471969
fix indentation
MaddyDev Oct 12, 2022
389e8ed
don't hardcode version
MaddyDev Oct 12, 2022
c090fde
add nuget version range syntax
MaddyDev Oct 14, 2022
b4351e0
Merge branch 'maddy/outofprocSupport' into maddy/samplesOutofProc
MaddyDev Oct 14, 2022
417e9e1
remove samplesOutofProc project
MaddyDev Oct 19, 2022
1bc7334
Merge branch 'main' into maddy/outofprocSupport
MaddyDev Oct 19, 2022
4020da4
address comments
MaddyDev Oct 19, 2022
06251d9
Merge branch 'maddy/outofprocSupport' into maddy/samplesOutofProc
MaddyDev Oct 19, 2022
869de79
address comments part2
MaddyDev Oct 19, 2022
9cf4418
missed set CommandText on output attribute
MaddyDev Oct 19, 2022
ac6a6da
remove unused param from xml
MaddyDev Oct 19, 2022
f6c6fcc
fix formatting
MaddyDev Oct 19, 2022
b26291b
Merge branch 'maddy/outofprocSupport' into maddy/samplesOutofProc
MaddyDev Oct 19, 2022
0416fff
test changes
MaddyDev Oct 19, 2022
e6b5edf
fix build errors
MaddyDev Oct 20, 2022
d0ca078
add dependencies to Directory.package
MaddyDev Oct 21, 2022
4bb9e57
recreated using az func extension for dependencies
MaddyDev Oct 25, 2022
9de98f0
remove webjob references & add worker references.
MaddyDev Oct 26, 2022
6825f3e
Merge branch 'main' into maddy/samplesOutofProc
MaddyDev Oct 26, 2022
aa4ec11
add Microsoft.AspNetCore.Mvc.Core ref
MaddyDev Oct 26, 2022
13480af
Merge branch 'main' into maddy/samplesOutofProc
MaddyDev Oct 27, 2022
311350a
add params func
MaddyDev Oct 27, 2022
b686c74
add more samples
MaddyDev Oct 28, 2022
ce0dcd5
fix output bindings and version string
MaddyDev Nov 1, 2022
3e35435
adding multiple items
MaddyDev Nov 1, 2022
bf89f0b
use default deserialization
MaddyDev Nov 1, 2022
0e64d6a
create input and output binding folders
MaddyDev Nov 2, 2022
5e838e5
update xml
MaddyDev Nov 2, 2022
9080e40
remove empty lines
MaddyDev Nov 2, 2022
df1650b
run package restore and comments
MaddyDev Nov 3, 2022
7bb6796
Merge branch 'main' into maddy/samplesOutofProc
MaddyDev Nov 3, 2022
b87d11a
merge main
MaddyDev Nov 3, 2022
6626767
package restore after merging main
MaddyDev Nov 3, 2022
03e399c
update Mvc.Core to 2.0.1
MaddyDev Nov 3, 2022
3dcc67e
remove java classes
MaddyDev Nov 3, 2022
c3812e2
Microsoft.AspNetCore.Mvc.Core to 2.2.0
MaddyDev Nov 3, 2022
f53facb
remove java changes
MaddyDev Nov 4, 2022
8aa2a2c
remove mvc core package dependency
MaddyDev Nov 4, 2022
c0671fe
remove sample, simple types supported outofproc
MaddyDev Nov 4, 2022
1f0d001
build error fix
MaddyDev Nov 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,10 @@
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.1" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker" Version="1.10.0" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.7.0" />
<PackageVersion Include="System.Net.NameResolution" Version="4.3.0" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.13" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.0" />
</ItemGroup>
</Project>
13 changes: 10 additions & 3 deletions WebJobs.Extensions.Sql.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30204.135
# Visual Studio Version 17
VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SqlExtensionSamples", "samples\samples-csharp\Microsoft.Azure.WebJobs.Extensions.Sql.Samples.csproj", "{B2E0EFB9-BEDB-48F7-BD5A-0E1010333475}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.WebJobs.Extensions.Sql.Samples", "samples\samples-csharp\Microsoft.Azure.WebJobs.Extensions.Sql.Samples.csproj", "{B2E0EFB9-BEDB-48F7-BD5A-0E1010333475}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.WebJobs.Extensions.Sql", "src\Microsoft.Azure.WebJobs.Extensions.Sql.csproj", "{4453B407-2CA3-4011-BDE5-247FCE5C1974}"
EndProject
Expand All @@ -28,6 +28,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Worker.Extension.Sql", "Wor
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extension.Sql", "Worker.Extension.Sql\src\Microsoft.Azure.Functions.Worker.Extension.Sql.csproj", "{84D97605-F1BF-4083-9C93-2B68A9FBB00F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc", "samples\samples-outofproc\Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.csproj", "{BD0CE086-1778-4B08-905F-6766399C1D44}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -54,6 +56,10 @@ Global
{84D97605-F1BF-4083-9C93-2B68A9FBB00F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84D97605-F1BF-4083-9C93-2B68A9FBB00F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{84D97605-F1BF-4083-9C93-2B68A9FBB00F}.Release|Any CPU.Build.0 = Release|Any CPU
{BD0CE086-1778-4B08-905F-6766399C1D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD0CE086-1778-4B08-905F-6766399C1D44}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD0CE086-1778-4B08-905F-6766399C1D44}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD0CE086-1778-4B08-905F-6766399C1D44}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -64,6 +70,7 @@ Global
{A5B55530-71C8-4A9A-92AD-1D33A5E80FC1} = {F7E99EB5-47D3-4B50-A6AA-D8D5508A121A}
{1A5148B7-F877-4813-852C-F94D6EF795E8} = {F0F3562F-9176-4461-98E4-13D38D3DD056}
{84D97605-F1BF-4083-9C93-2B68A9FBB00F} = {605E19C0-3A77-477F-928E-85B8972B734D}
{BD0CE086-1778-4B08-905F-6766399C1D44} = {3691FB44-971D-43FD-9B2F-916B8CE689DB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {49902AA5-150F-4567-B562-4AA8549B2CF4}
Expand Down
2 changes: 1 addition & 1 deletion Worker.Extension.Sql/src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

using Microsoft.Azure.Functions.Worker.Extensions.Abstractions;

[assembly: ExtensionInformation("Microsoft.Azure.WebJobs.Extensions.Sql", "0.*-preview")]
[assembly: ExtensionInformation("Microsoft.Azure.WebJobs.Extensions.Sql", "0.*-*")]
45 changes: 23 additions & 22 deletions performance/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,28 +224,6 @@
"Microsoft.Net.Http.Headers": "2.2.0"
}
},
"Microsoft.AspNetCore.Mvc.Core": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "ALiY4a6BYsghw8PT5+VU593Kqp911U3w9f/dH9/ZoI3ezDsDAGiObqPu/HP1oXK80Ceu0XdQ3F0bx5AXBeuN/Q==",
"dependencies": {
"Microsoft.AspNetCore.Authentication.Core": "2.2.0",
"Microsoft.AspNetCore.Authorization.Policy": "2.2.0",
"Microsoft.AspNetCore.Hosting.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Http": "2.2.0",
"Microsoft.AspNetCore.Http.Extensions": "2.2.0",
"Microsoft.AspNetCore.Mvc.Abstractions": "2.2.0",
"Microsoft.AspNetCore.ResponseCaching.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Routing": "2.2.0",
"Microsoft.AspNetCore.Routing.Abstractions": "2.2.0",
"Microsoft.Extensions.DependencyInjection": "2.2.0",
"Microsoft.Extensions.DependencyModel": "2.1.0",
"Microsoft.Extensions.FileProviders.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"System.Diagnostics.DiagnosticSource": "4.5.0",
"System.Threading.Tasks.Extensions": "4.5.1"
}
},
"Microsoft.AspNetCore.Mvc.Formatters.Json": {
"type": "Transitive",
"resolved": "2.2.0",
Expand Down Expand Up @@ -2158,6 +2136,29 @@
"Microsoft.Net.Http.Headers": "2.2.0"
}
},
"Microsoft.AspNetCore.Mvc.Core": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "ALiY4a6BYsghw8PT5+VU593Kqp911U3w9f/dH9/ZoI3ezDsDAGiObqPu/HP1oXK80Ceu0XdQ3F0bx5AXBeuN/Q==",
"dependencies": {
"Microsoft.AspNetCore.Authentication.Core": "2.2.0",
"Microsoft.AspNetCore.Authorization.Policy": "2.2.0",
"Microsoft.AspNetCore.Hosting.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Http": "2.2.0",
"Microsoft.AspNetCore.Http.Extensions": "2.2.0",
"Microsoft.AspNetCore.Mvc.Abstractions": "2.2.0",
"Microsoft.AspNetCore.ResponseCaching.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Routing": "2.2.0",
"Microsoft.AspNetCore.Routing.Abstractions": "2.2.0",
"Microsoft.Extensions.DependencyInjection": "2.2.0",
"Microsoft.Extensions.DependencyModel": "2.1.0",
"Microsoft.Extensions.FileProviders.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"System.Diagnostics.DiagnosticSource": "4.5.0",
"System.Threading.Tasks.Extensions": "4.5.1"
}
},
"Microsoft.Azure.WebJobs": {
"type": "CentralTransitive",
"requested": "[3.0.32, )",
Expand Down
45 changes: 23 additions & 22 deletions samples/samples-csharp/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,28 +212,6 @@
"Microsoft.Net.Http.Headers": "2.2.0"
}
},
"Microsoft.AspNetCore.Mvc.Core": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "ALiY4a6BYsghw8PT5+VU593Kqp911U3w9f/dH9/ZoI3ezDsDAGiObqPu/HP1oXK80Ceu0XdQ3F0bx5AXBeuN/Q==",
"dependencies": {
"Microsoft.AspNetCore.Authentication.Core": "2.2.0",
"Microsoft.AspNetCore.Authorization.Policy": "2.2.0",
"Microsoft.AspNetCore.Hosting.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Http": "2.2.0",
"Microsoft.AspNetCore.Http.Extensions": "2.2.0",
"Microsoft.AspNetCore.Mvc.Abstractions": "2.2.0",
"Microsoft.AspNetCore.ResponseCaching.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Routing": "2.2.0",
"Microsoft.AspNetCore.Routing.Abstractions": "2.2.0",
"Microsoft.Extensions.DependencyInjection": "2.2.0",
"Microsoft.Extensions.DependencyModel": "2.1.0",
"Microsoft.Extensions.FileProviders.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"System.Diagnostics.DiagnosticSource": "4.5.0",
"System.Threading.Tasks.Extensions": "4.5.1"
}
},
"Microsoft.AspNetCore.Mvc.Formatters.Json": {
"type": "Transitive",
"resolved": "2.2.0",
Expand Down Expand Up @@ -1760,6 +1738,29 @@
"System.Diagnostics.DiagnosticSource": "5.0.0"
}
},
"Microsoft.AspNetCore.Mvc.Core": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "ALiY4a6BYsghw8PT5+VU593Kqp911U3w9f/dH9/ZoI3ezDsDAGiObqPu/HP1oXK80Ceu0XdQ3F0bx5AXBeuN/Q==",
"dependencies": {
"Microsoft.AspNetCore.Authentication.Core": "2.2.0",
"Microsoft.AspNetCore.Authorization.Policy": "2.2.0",
"Microsoft.AspNetCore.Hosting.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Http": "2.2.0",
"Microsoft.AspNetCore.Http.Extensions": "2.2.0",
"Microsoft.AspNetCore.Mvc.Abstractions": "2.2.0",
"Microsoft.AspNetCore.ResponseCaching.Abstractions": "2.2.0",
"Microsoft.AspNetCore.Routing": "2.2.0",
"Microsoft.AspNetCore.Routing.Abstractions": "2.2.0",
"Microsoft.Extensions.DependencyInjection": "2.2.0",
"Microsoft.Extensions.DependencyModel": "2.1.0",
"Microsoft.Extensions.FileProviders.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"System.Diagnostics.DiagnosticSource": "4.5.0",
"System.Threading.Tasks.Extensions": "4.5.1"
}
},
"Microsoft.Azure.WebJobs": {
"type": "CentralTransitive",
"requested": "[3.0.32, )",
Expand Down
6 changes: 6 additions & 0 deletions samples/samples-outofproc/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-azuretools.vscode-azurefunctions",
"ms-dotnettools.csharp"
]
}
11 changes: 11 additions & 0 deletions samples/samples-outofproc/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to .NET Functions",
"type": "coreclr",
"request": "attach",
"processId": "${command:azureFunctions.pickProcess}"
}
]
}
7 changes: 7 additions & 0 deletions samples/samples-outofproc/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"azureFunctions.deploySubpath": "bin/Release/net6.0/publish",
"azureFunctions.projectLanguage": "C#",
"azureFunctions.projectRuntime": "~4",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.preDeployTask": "publish (functions)"
}
69 changes: 69 additions & 0 deletions samples/samples-outofproc/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "clean (functions)",
"command": "dotnet",
"args": [
"clean",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"type": "process",
"problemMatcher": "$msCompile"
},
{
"label": "build (functions)",
"command": "dotnet",
"args": [
"build",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"type": "process",
"dependsOn": "clean (functions)",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": "$msCompile"
},
{
"label": "clean release (functions)",
"command": "dotnet",
"args": [
"clean",
"--configuration",
"Release",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"type": "process",
"problemMatcher": "$msCompile"
},
{
"label": "publish (functions)",
"command": "dotnet",
"args": [
"publish",
"--configuration",
"Release",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"type": "process",
"dependsOn": "clean release (functions)",
"problemMatcher": "$msCompile"
},
{
"type": "func",
"dependsOn": "build (functions)",
"options": {
"cwd": "${workspaceFolder}/bin/Debug/net6.0"
},
"command": "host start",
"isBackground": true,
"problemMatcher": "$func-dotnet-watch"
}
]
}
21 changes: 21 additions & 0 deletions samples/samples-outofproc/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

using System.Diagnostics.CodeAnalysis;

// These suppression rules override parameters required by functions binding that cannot be converted to discard variables per issue: https://github.com/Azure/azure-functions-dotnet-worker/issues/323
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.InputBindingSamples.GetProducts.Run(Microsoft.AspNetCore.Http.HttpRequest,System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product})~System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product}")]
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.InputBindingSamples.GetProductNamesView.Run(Microsoft.AspNetCore.Http.HttpRequest,System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.ProductName})~System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.ProductName}")]
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.InputBindingSamples.GetProductsAsyncEnumerable.Run(Microsoft.AspNetCore.Http.HttpRequest,System.Collections.Generic.IAsyncEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product})~System.Threading.Tasks.Task{System.Collections.Generic.List{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product}")]
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.InputBindingSamples.GetProductsNameEmpty.Run(Microsoft.AspNetCore.Http.HttpRequest,System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product})~System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product}")]
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.InputBindingSamples.GetProductsNameNull.Run(Microsoft.AspNetCore.Http.HttpRequest,System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product})~System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product}")]
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.InputBindingSamples.GetProductsStoredProcedure.Run(Microsoft.AspNetCore.Http.HttpRequest,System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product})~System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product}")]
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.InputBindingSamples.GetProductsStoredProcedureFromAppSetting.Run(Microsoft.AspNetCore.Http.HttpRequest,System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product})~System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product}")]
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.InputBindingSamples.GetProductsString.Run(Microsoft.AspNetCore.Http.HttpRequest,System.String)~System.String")]
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.InputBindingSamples.GetProductsTopN.Run(Microsoft.AspNetCore.Http.HttpRequest,System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product})~System.Collections.Generic.IEnumerable{Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.Product}")]
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Unused parameter is required by functions binding", Scope = "member", Target = "~M:Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.OutputBindingSamples.AddProductsWithIdentityColumnArray.Run(Microsoft.AspNetCore.Http.HttpRequest)~Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common.ProductWithoutId[]")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System.Collections.Generic;
using Microsoft.AspNetCore.Http;
using Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common;
using Microsoft.Azure.Functions.Worker.Extension.Sql;
using Microsoft.Azure.Functions.Worker;

namespace Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.InputBindingSamples
{
/// <summary>
/// This shows an example of a SQL Input binding that queries from a SQL View named ProductNames.
/// </summary>
public static class GetProductNamesView
{
[Function("GetProductNamesView")]
public static IEnumerable<ProductName> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "getproduct-namesview/")]
HttpRequest req,
[SqlInput("SELECT * FROM ProductNames",
CommandType = System.Data.CommandType.Text,
ConnectionStringSetting = "SqlConnectionString")]
IEnumerable<ProductName> products)
{
return products;
}
}
}
28 changes: 28 additions & 0 deletions samples/samples-outofproc/InputBindingSamples/GetProducts.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using Microsoft.AspNetCore.Http;
using System.Collections.Generic;
using Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.Common;
using Microsoft.Azure.Functions.Worker.Extension.Sql;
using Microsoft.Azure.Functions.Worker;


namespace Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.InputBindingSamples
{
public static class GetProducts
{
[Function("GetProducts")]
public static IEnumerable<Product> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "getproducts/{cost}")]
HttpRequest req,
[SqlInput("select * from Products where Cost = @Cost",
CommandType = System.Data.CommandType.Text,
Parameters = "@Cost={cost}",
ConnectionStringSetting = "SqlConnectionString")]
IEnumerable<Product> products)
{
return products;
}
}
}
Loading