npgsql JSON Mapping - multiple different objects in JSONB column with EF Core - npgsql

I have a table in postgres containing a JSONB column.
This column contains a JSON object serialized from various C# types. This table also contains a column to select the C# type.
My entity model defines the JSON object as a string.
How to automatically deserialize into differing C# types?
BR Jochen

Related

Batch table/Column update in powerdesigner reading from excel using vb script

I am looking for developing a vb script which would extract all the table/columns from powerdesigner model to a excel file. After changing few properties I will be updating it to the model using vbscript. So I would like to know if there is any property of a column which can uniquely identify each column of a table. Example:- ROWID column in oracle
Does powerdesigner maintain unique id for each object created in PDM?
Most (all?) modelisation objects derive from IdentifiedObject, which has an ObjectID property, a GUID.

Access 2010 VBA: What is the VBA object that represents a Pivot Table Form field's returned values?

I'm attempting to assign the result of an Access Pivot Table's field of queried values to an array variable, but I'm having trouble finding the appropriate representative object in the MSDN library for a Form/Pivot Table/field/ values.
A few thoughts:
pivot tables are not supported in access 2013.
Can you get the same data from a recordset?
H

Linq can retrieve distinct entities that have text/clob properties?

I have an Entity that has varchar and text columns (Text/CLOB database type).
The following query doesn't work, because MyEntity has Clob columns (Oracle). Similar behavior is expected in SqlServer with its Text columns.
var query = from e in ctx.MyEntity select e.Distinct()
How can I use Linq to retrive distinct rows from this table/entity?
Note: I can't use SqlServer's "varchar(max)"; it must be 'text' type; because in other DBMS like Oracle there's no varchar(max) type.
My issue is due to SqlServer and Oracle compatibility with Linq / Entity Framework.
Note2: I need objects of MyEntity type in the output select, and not generic types and no other kind of types.
I appreciate any suggestions. Thanks.

Is there any ORM Framework which maps in another way than ActiveRecord pattern says?

There is commonly used method to map object to table (one object - one row in a table; the table is corresponding to object type), i.e., each object's public field is mapped to corresponding column in a table. Most of the ORM Frameworks are based on that mapping method. The question is there any ORM Framework (based on .Net Framework and well suited for C#) which allows to map object onto several rows in a table where each object's field is mapped to corresponding table's row?
I think what you're looking for is an ORM that generates Collection objects for each of your tables.
Look into Propel ORM
Any query that returns more than 1 row returns a TableObjectCollection object that has multiple convenient methods for access.
It is hard to say for all ORM Frameworks existing for today. But mapping in a following way:
(1) class type - table,
(2) class member/field - column of the table,
(3) class instance - row in a table,
is the well known practice. So, the more probable answer is there is no such ORM which maps a particular class instance on several rows. Otherwise, in accord with (2) the class type must has several members/fields represented with the same name but this is hardly possible.

Full Text search on a Varbinary Column - Is it possible to use a mime type rather than a file extension as my Type Column?

I am setting up full text search on an existing database. We have Document table with the following schema:
ID int Not Null,
Data varbinary(max) Not Null
MimeType varchar Not Null
I want to use full text search on the data column, using the mimetype to specify the document type.
I was hoping it would be possible to register new types into whatever tables are used when you use the view sys.fulltext_document_types. Is this possible?
No it isn't possible. IFilters are mapped to a document extension. A new column has to be added and populated.

Resources