Simple.Data.Npgsql by Chris Hogan,Yaroslav Tatarenko

<PackageReference Include="Simple.Data.Npgsql" Version="0.19.1" />

 InsertParameter

public static class InsertParameter
using System; namespace Simple.Data.Npgsql { public static class InsertParameter { public static object Transform(object value) { if (value != null) { Type type = value.GetType(); if (type.IsEnum) value = Convert.ChangeType(value, Enum.GetUnderlyingType(type)); } return value; } } }