Created
March 9, 2021 21:48
-
-
Save m-khooryani/6c8fc61a2e448feee1f5a3a45fbafc08 to your computer and use it in GitHub Desktop.
without middleware function app
This file contains hidden or 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
[FunctionName(nameof(SomeCommandFunction))] | |
public static async Task<Guid> Run([HttpTrigger(AuthorizationLevel.Anonymous, "post")] | |
HttpRequestData req, FunctionExecutionContext executionContext, | |
ILogger logger, | |
IUnitOfWork unitOfWork) | |
{ | |
logger.LogInformation("Function started"); | |
// some Logic (skipped for simplicity) | |
var addedId = Guid.NewGuid(); | |
await unitOfWork.CommitAsync(); | |
logger.LogInformation("Function finished"); | |
return addedId; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment