Can arrays be used in Entity Framework with PostgreSql?
Suppose, for example, that we had a POCO class
public class MyTable
{
[Key]
[Column("gid")]
public int Gid { get; set; }
[Column("name")]
public string Name { get; set; }
[Column("email")]
public string Email { get; set; }
[Column("somedata")]
public int[] SomeData { get; set; }
}
At this point, the Entity Framework simply does not create the "somedata" column and skips it. Is there any way to do this anyway? And I mean that you do not need to use a separate table. Postgres arrays come in handy from time to time when you want to keep a small or limited number of values ββin one column.
source
share