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
@EventType = 0xE9507561 |
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
public async Task InsertTweetStoreProc(string username, string message, CancellationToken ct = default) | |
{ | |
using (_logger.BeginScope(new Dictionary<string, object> { { "EFQueries", "GetTweetsLog" } })) | |
{ | |
_ = await _context.Database | |
.ExecuteSqlRawAsync( | |
"InsertTweet @Username, @Message", | |
new SqlParameter("Username", username), | |
new SqlParameter("Message", message)); | |
} |
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
param( | |
[Parameter()] | |
[ValidateNotNullOrEmpty()] | |
[string] $ResourceGroup = $null, | |
[Parameter()] | |
[ValidateNotNullOrEmpty()] | |
[string] $ResourceLocation = 'EastUS', | |
# F0 is free and S0 is paid SKU |
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
public static class TagWithExtensions | |
{ | |
public static IQueryable<T> TagWithContext<T>(this IQueryable<T> queryable, string? message = "", [CallerFilePath] string callerFileName = "", [CallerMemberName] string callerName = "") | |
{ | |
string logScopeName = GenerateLogScopeName(message, callerFileName, callerName); | |
return queryable.TagWith(logScopeName); | |
} | |
private static string GenerateLogScopeName(string? message = null, string callerFileName = "", string callerName = "") | |
{ |
OlderNewer