mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-19 09:35:36 -05:00
Add error for sql bindings when .net 5 (#1259)
* add error for sql bindings when .net 5 * add test * cleanup linq stuff and move out common code
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using Microsoft.Azure.Functions.Worker;
|
||||
using Microsoft.Azure.Functions.Worker.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Company.Function
|
||||
{
|
||||
public static class HttpTrigger1
|
||||
{
|
||||
[Function("HttpTrigger1")]
|
||||
public static HttpResponseData Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequestData req,
|
||||
FunctionContext executionContext)
|
||||
{
|
||||
var logger = executionContext.GetLogger("HttpTrigger1");
|
||||
logger.LogInformation("C# HTTP trigger function processed a request.");
|
||||
|
||||
var response = req.CreateResponse(HttpStatusCode.OK);
|
||||
response.Headers.Add("Content-Type", "text/plain; charset=utf-8");
|
||||
|
||||
response.WriteString("Welcome to Azure Functions!");
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user