This repository was archived by the owner on Jun 14, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
dotnet/aspnetcore/functionApp/Application/SampleFunctionApp Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,11 @@ public static async Task<IActionResult> Run(
2525 dynamic data = JsonConvert . DeserializeObject ( requestBody ) ;
2626 name = name ?? data ? . name ;
2727
28- return name != null
29- ? ( ActionResult ) new OkObjectResult ( $ "Hello { name } ! Welcome to Azure Functions!")
30- : ( ActionResult ) new OkObjectResult ( "Hello there! Welcome to Azure Functions!" ) ;
28+ string responseMessage = string . IsNullOrEmpty ( name )
29+ ? "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."
30+ : $ "Hello, { name } . This HTTP triggered function executed successfully.";
31+
32+ return new OkObjectResult ( responseMessage ) ;
3133 }
3234 }
3335}
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22 <PropertyGroup >
3- <TargetFramework >netcoreapp2.1 </TargetFramework >
4- <AzureFunctionsVersion >v2 </AzureFunctionsVersion >
3+ <TargetFramework >net6.0 </TargetFramework >
4+ <AzureFunctionsVersion >v4 </AzureFunctionsVersion >
55 </PropertyGroup >
66 <ItemGroup >
7- <PackageReference Include =" Microsoft.NET.Sdk.Functions" Version =" 1 .0.24 " />
7+ <PackageReference Include =" Microsoft.NET.Sdk.Functions" Version =" 4 .0.1 " />
88 </ItemGroup >
99 <ItemGroup >
1010 <None Update =" host.json" >
1515 <CopyToPublishDirectory >Never</CopyToPublishDirectory >
1616 </None >
1717 </ItemGroup >
18- </Project >
18+ </Project >
You can’t perform that action at this time.
0 commit comments