Page 1 of 1

LinqConnect Model not supporting custom PostgreSQL data types (domains)

Posted: Wed 01 Jun 2016 19:03
by claflamme
We are using a custom field data type to store email addresses defined like this in PostgreSQL:

CREATE DOMAIN schema1."d_Email"
AS character varying(50)
COLLATE pg_catalog."default"
CONSTRAINT "d_Email_check" CHECK (rubixprocessing."f_IsValidEmail"(VALUE::text) = true);
ALTER DOMAIN schema1."d_Email"

When using linqConnect and adding a table using this data type to the model, we get the following error:

The ServerDataType value of the Column element 'Email' in the Type element 'Person' is not valid. The data type 'D_EMAIL' is not supported.

We are testing linqConnect for the first time to see if we could use it in our projects. We are blocked on this issue.

Re: LinqConnect Model not supporting custom PostgreSQL data types (domains)

Posted: Fri 03 Jun 2016 14:59
by Shalex
LinqConnect works with a specific set of primitive data types only: https://www.devart.com/linqconnect/docs ... pping.html. User defined types are not supported.

As a workarond, please work with domains via plain ADO.NET classes (PgSqlConnection / PgSqlCommand / etc).