Skip to content

property or indexer cannot be assigned to #30

Description

@RuudH

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions