Skip to content

Instantly share code, notes, and snippets.

View edsonbonfim's full-sized avatar
🏠
Working from home

Edson Bonfim edsonbonfim

🏠
Working from home
View GitHub Profile
@edsonbonfim
edsonbonfim / create-pfx
Created May 12, 2022 20:46 — forked from jamielaundon/create-pfx
Create IIS .pfx from Let's Encrypt fullchain and privkey
sudo openssl pkcs12 -export -in /etc/letsencrypt/live/domain.com/fullchain.pem -inkey /etc/letsencrypt/live/domain.com/privkey.pem -out domain.com.pfx
private static ISessionFactory CreateSessionFactory()
{
var rawConfig = new NHibernate.Cfg.Configuration();
rawConfig.SetNamingStrategy(new PostgreSqlNamingStrategy());
return Fluently.Configure(rawConfig)
.Database(PostgreSQLConfiguration.Standard
.ConnectionString("<connection string>")
.Dialect<PostgreSQL82Dialect>().ShowSql())
.Mappings(m =>
public class PostgresNamingStrategy : INamingStrategy
{
public string ClassToTableName(string className)
{
return DoubleQuote(className);
}
public string PropertyToColumnName(string propertyName)
{
return DoubleQuote(propertyName);