ObjectSet EntitySet contains all duplicates

158 Views Asked by At

I have the following data in a SQL table called tb_CField

CampaignID FieldName

739 L_extra1

739 L_extra2

739 L_extra3

When I access the data via the Entity Framework (v4), the object context method

oc.tb_CField()

the EntitySet contains three entries as I would expect but they are all

739 L_extra1

ie just the first record / entity ??

1

There are 1 best solutions below

0
On

Your entity either has no DB primary key or has a primary key in the DB which is not correctly mapped in your entity model. Fix that.