linqpad-postgresql-driver icon indicating copy to clipboard operation
linqpad-postgresql-driver copied to clipboard

property or indexer cannot be assigned to

Open RuudH opened this issue 6 years ago • 0 comments

Hi Frederik,

i don't know if this is an issue with the driver or the way we setup the database. So maybe i'm in the wrong place with my issue/question.

We resently changed databases from MSsql to postgesql. In linqpad i had a statements file that could insert data from a CSV file. For MSsql this worked great, but now that we have switched to postgress is doesn't work anymore. for example i have the object Guest that has multiple Address objects (we have a foreign key on the Address table that points to the Guest's ID. I did something like : select new Guest { Surname = 'bla', Guestaddresses = new EntitySet<Guestaddress>() { new Guestaddress () { Zipcode = '9999ER' }}

Doing this in linqpad with the postresql driver 0.3.0.0 i get an error : CS0200 Property or indexer Guest.Guestaddresses cannot be assigned to -- it is readonly

do you have any suggestions what i am doing wrong? Thanks for your time!

RuudH avatar May 14 '18 13:05 RuudH