Storing JSON objects

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
RobertK
Posts: 111
Joined: Thu 02 Mar 2017 05:44

Storing JSON objects

Post by RobertK » Tue 04 May 2021 12:15

database: postgres

In Entity Developer, what column data type do you use to store JSON objects?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Storing JSON objects

Post by Shalex » Wed 05 May 2021 10:45

JSON is mapped to System.String. Refer to https://www.devart.com/dotconnect/postg ... pping.html.

JIC: you can change default mapping via Visual Studio > Tools > Entity Developer > Options > Devart Entity Developer > Servers Options > PostgreSQL.

RobertK
Posts: 111
Joined: Thu 02 Mar 2017 05:44

Re: Storing JSON objects

Post by RobertK » Tue 11 May 2021 07:54

what would you select for the datatype? jsonobject?

https://pasteboard.co/K1mNhHp.png

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Storing JSON objects

Post by Shalex » Thu 13 May 2021 13:00

If you work with Devart EF Core Model (*.efml) using Npgsql provider, you can map JSON to JsonDocument and JsonElement.

Refer to https://www.devart.com/entitydeveloper/ ... story.html:
6.11.1213 01-Apr-21
System.Text.Json (JsonDocument and JsonElement as property types) is supported for Pomelo.EntityFrameworkCore.MySql and Npgsql in EF Core Model

Post Reply