I use Postgres and I have DB with a table that looks like that
column - footype - jsonbvalue - {"baz" : "test" }
Please notice that "baz" is not capitalized (pretty much this json document will be in a camelCase).
I have the code in C# (so the naming convention is Pascal Case)
public class Foo{ [Column(TypeName = "jsonb")] public BarData Bar { get; set; }}public class BarData{ // ??? What kind of annotation to put here public String Baz { get; set; }}
I use entity framework + npgsql to read/write to DB. Unfortunately, when npgsql read from DB, it won't populate Baz (because the naming convention doesn't match)
a) I tried to use [Column("baz")]. However, it's ignored (probably because it's not really a column, but a json tag)
b) I was considering naming the property "baz", but it just shifts a problem to another place in the code (where another mapping needs to be done).
As a result, I am looking whether I missed some way to do it case-insensitive or map the property to the name which comes from json.