views:

17

answers:

0

Hi,

I have a problem with saving changes in Enitity Framework. I create a new repository, which creates a new ObjectContext. I then use Films.First(u => u.film == filmId); to get the object, update some of the properties and then call repository db.SaveChanges(System.Data.Objects.SaveOptions.None); I then get the error:

InvalidOperationExceptio "More than one item in the metadata collection match the identity filmId"

Anyone got any ideas?

Thanks.