This project is read-only.
1
Vote

Conflicting changes to the role 'table' of the relationship 'fk' have been detected.

description

Hi ,

I am getting following exception in entity framework.

In following line
public virtual void Update(TEfClass entity)
    {           

            DbEntityEntry dbEntityEntry = DBContext.Entry(entity);//<===== In this line am getting exception                                "Conflicting changes to the role 'table' of the relationship 'fk' have been detected."

            if (dbEntityEntry.State == EntityState.Detached)
            {
                DbSet.Attach(entity);
            }
            dbEntityEntry.State = EntityState.Modified;
    }
        Can someone please help me ?

comments