Created
May 29, 2019 04:47
-
-
Save jeffhollan/a28b847b839a02f750b26b29ca20fba3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.Http; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.Logging; | |
namespace functions_csharp_entityframeworkcore | |
{ | |
public class HttpTrigger | |
{ | |
private readonly BloggingContext _context; | |
public HttpTrigger(BloggingContext context) | |
{ | |
_context = context; | |
} | |
[FunctionName("GetPosts")] | |
public async Task<IActionResult> Get( | |
[HttpTrigger(AuthorizationLevel.Function, "get", Route = "posts")] HttpRequest req, | |
ILogger log) | |
{ | |
log.LogInformation("C# HTTP trigger function processed a request."); | |
// Code that returns posts - you can see this code by going | |
// to the full sample linked at the bottom | |
return new OkResult(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment