Beispiel #1
0
        MyInt32HandlerFactory MapMyIntLocally(NpgsqlConnection conn)
        {
            var myFactory = new MyInt32HandlerFactory();

            conn.TypeMapper.AddMapping(new NpgsqlTypeMappingBuilder
            {
                PgTypeName         = "integer",
                NpgsqlDbType       = NpgsqlDbType.Integer,
                DbTypes            = new[] { DbType.Int32 },
                ClrTypes           = new[] { typeof(int) },
                TypeHandlerFactory = myFactory
            }.Build());
            return(myFactory);
        }
Beispiel #2
0
 public MyInt32Handler(PostgresType postgresType, MyInt32HandlerFactory factory)
     : base(postgresType)
 {
     _factory = factory;
 }
Beispiel #3
0
 public MyInt32Handler(PostgresType postgresType, MyInt32HandlerFactory factory)
 {
     PostgresType = postgresType;
     _factory     = factory;
 }
Beispiel #4
0
 public MyInt32Handler(MyInt32HandlerFactory factory)
 {
     _factory = factory;
 }