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
# Requires PowerShell 6+ | |
# Run in your PostgreSQL data directory | |
# The pg_ctl reload command may require running it with Administrator rights | |
# Add a user mapping for domain users (or local users if your computer is not in a domain) to your pg_ident.conf | |
(Get-Content -Path pg_ident.conf -Encoding utf8NoBOM) ` | |
-replace "# MAPNAME SYSTEM-USERNAME PG-USERNAME",` | |
"# MAPNAME SYSTEM-USERNAME PG-USERNAME`r`nDomainOrLocalUser /^(.*)@$env:USERDOMAIN \1" | ` | |
Set-Content -Path pg_ident.conf -Encoding utf8NoBOM |
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 Microsoft.AspNetCore.Identity; | |
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; | |
using System.Linq; | |
namespace My.App.Data | |
{ | |
public class DbInitializer : IDbInitializer | |
{ | |
private readonly ApplicationDbContext _context; | |
private readonly UserManager<ApplicationUser> _userManager; |
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; | |
using System.IO; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.EntityFrameworkCore.Metadata; | |
using Microsoft.Extensions.Configuration; | |
namespace DalSoft.Data |
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 string GetVirtualPath(VirtualPathContext context) | |
{ | |
foreach (var matcherParameter in _matcher.Template.Parameters) | |
{ | |
context.Values.Remove(matcherParameter.Name); // make sure none of the domain-placeholders are appended as query string parameters | |
} | |
return _innerRoute.GetVirtualPath(context); | |
} |
Testing subscript and superscript
Testing subscript subscript level 2
Testing superscript superscript level 2