According to this thread (https://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=24713), Geometry is supported. Npgsql also supports it (http://www.npgsql.org/doc/types/basic.html).
I am using the latest LLBLGEN and NpgSql 4.0.1 (the same error in 3.2.7 as well)
This is the schema
-- Table: public.city
-- DROP TABLE public.city;
CREATE TABLE public.city
(
id smallint NOT NULL,
uuid uuid NOT NULL DEFAULT gen_random_uuid(),
country_id character varying(3) COLLATE pg_catalog."default" NOT NULL,
name_en character varying(255) COLLATE pg_catalog."default" NOT NULL,
name_ar character varying(255) COLLATE pg_catalog."default",
name_fr character varying(255) COLLATE pg_catalog."default",
lat_long geometry,
is_active boolean NOT NULL DEFAULT true,
CONSTRAINT "PK_city" PRIMARY KEY (id),
CONSTRAINT "FK_city_country_id_country_id" FOREIGN KEY (country_id)
REFERENCES public.country (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public.city
OWNER to postgres;
-- Index: IX_city_country_id
-- DROP INDEX public."IX_city_country_id";
CREATE INDEX "IX_city_country_id"
ON public.city USING btree
(country_id COLLATE pg_catalog."default")
TABLESPACE pg_default;
-- Index: IX_city_uuid
-- DROP INDEX public."IX_city_uuid";
CREATE UNIQUE INDEX "IX_city_uuid"
ON public.city USING btree
(uuid)
TABLESPACE pg_default;
Generates the following error. The field 'LatLong' is mapped to Object at the designer so it should be OK.
NotSupportedException: The field 'LatLong' has type 'public.geometry', which is currently unknown to Npgsql. You can retrieve it as a string by marking it as unknown, please see the FAQ.
Npgsql.NpgsqlDefaultDataReader.GetValue(int ordinal) in NpgsqlDefaultDataReader.cs
Npgsql.NpgsqlDataReader.GetValues(object[] values) in NpgsqlDataReader.cs
SD.LLBLGen.Pro.ORMSupportClasses.EntityMaterializerBase.MaterializeAsync(Func<IDataReader, object[], Exception, bool> valueReadErrorHandler, CancellationToken cancellationToken)
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.ExecuteMultiRowRetrievalQueryAsync(IRetrievalQuery queryToExecute, IEntityFactory2 entityFactory, IEntityCollection2 collectionToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo, bool allowDuplicates, IEntityFields2 fieldsUsedForQuery, CancellationToken cancellationToken)
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.FetchEntityCollectionInternalAsync(QueryParameters parameters, CancellationToken cancellationToken)
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.FetchEntityCollectionAsync(QueryParameters parameters, CancellationToken cancellationToken)
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteWithActiveRecoveryStrategyAsync(Func<Task> toExecute, CancellationToken cancellationToken)
SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProvider2.ExecuteEntityProjectionAsync(QueryExpression toExecute, CancellationToken cancellationToken)
SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.ExecuteExpressionAsync(Expression handledExpression, Type typeForPostProcessing, bool performPostProcessing, CancellationToken cancellationToken)
SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.PerformExecuteAsync(Expression expression, Type typeForPostProcessing, bool performPostProcessing, CancellationToken cancellationToken)
SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.ExecuteAsync<TResult>(Expression expression, CancellationToken cancellationToken)
SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProQuery<T>.ExecuteAsync<TResult>(CancellationToken cancellationToken)
SD.LLBLGen.Pro.LinqSupportClasses.QueryableExtensionMethods.ToListAsync<TResult>(IQueryable<TResult> source, CancellationToken cancellationToken)