Search code examples
c#postgresqlentity-frameworknpgsql

c# npgsql Entity Framework Int Array



I have a table column which type is nullable int[]. My problem is i cant use this column in my entity object. I tried a lot of things. ext :

        public List<int> column1 { get; set; }

        public List?<int> column1 { get; set; }

        public int?[] column1 { get; set; } 

        public int[] column1 { get; set; }


Npgsql version : 3.2.5.0
EF version : 6.0.0.0

Thanks. Atakan.


Solution

  • The closed type system of Entity Framework 6.x doesn't allow for supporting arrays. However, the Npgsql Entity Framework Core does support array columns.