Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 09ce628

Browse files
committed
added null controller
1 parent 1b44e87 commit 09ce628

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

‎Controllers/ControllerQuery.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public ControllerQuery(IConfiguration config, ILogger<ControllerQuery> logger)
3737
_logger.LogDebug($"Executing {procedure}");
3838

3939
var connectionStringName = verb.ToLower() != "get" ? "ReadWriteConnection" : "ReadOnlyConnection";
40-
40+
4141
using(var conn = new SqlConnection(_config.GetConnectionString(connectionStringName))) {
4242
DynamicParameters parameters = new DynamicParameters();
4343

‎Controllers/NullController.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
using Microsoft.Extensions.Logging;
7+
using System.Text.Json;
8+
using Microsoft.Extensions.Configuration;
9+
10+
namespace AzureSamples.AzureSQL.Controllers
11+
{
12+
[ApiController]
13+
[Route("[controller]")]
14+
public class NullController : ControllerBase
15+
{
16+
[HttpGet]
17+
public string Get()
18+
{
19+
var dummy = new {
20+
TimeStamp = DateTime.UtcNow
21+
};
22+
23+
return JsonSerializer.Serialize(dummy);
24+
}
25+
}
26+
}

‎azure-deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ az webapp create \
5757
-n $appName \
5858
--plan "windows-plan" \
5959
--deployment-source-url $gitSource \
60-
--deployment-source-branch master
60+
--deployment-source-branch perftest
6161

6262
echo "Configuring Connection String...";
6363
az webapp config connection-string set \

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /