Carrier table column issue?

i am writing custom code in method directive, and trying to access the Carrier table. seems like the carrier table primary key “Carrier” is clashing with table name “Carrier”.

any workarounds? @Bart_Elia

var ttCarrier = (from cr in Db.Carrier where cr.Company == Session.CompanyID && cr.Carrier ==101 select cr).FirstOrDefault();

Error:
does not contain a definition for 'Carrier and no extension method ‘Carrier’

Use Carrier1 as the field

2 Likes

thank you @jose for your prompt responses. it worked.

Yup use the 1.
That’s entity framework behavior on name conflicts over table and column

1 Like