Created
June 25, 2021 01:07
-
-
Save MahdiKarimipour/574b3c491f5b02a96f00927c8556db72 to your computer and use it in GitHub Desktop.
App Secrets Access
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
public class EmailSender | |
{ | |
private readonly IConfiguration configuration; | |
public EmailSender(IConfiguration configuration) | |
{ | |
this.configuration = configuration; | |
} | |
public async Task SendEmailAsync() | |
{ | |
var sendGridApiKey = configuration | |
.GetSection(nameof(AppSecrets)) | |
.Get<AppSecrets>() | |
.SendGridSecrets | |
.ApiKey; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment