c# - The property " MandatID " is part of the key information of the object and can not be changed -


i'm working on asp.net mvc 4 project , i'm using entityframework connect database. have 4 table :

  • mandat: primarykey mandatid
  • commande: composite primarykey commandeid, mandatid , foriengkey mandatid references mandat
  • article: composite primarykey articleid, mandatid , foriengkey mandatid references mandat
  • lignecommande (association table) : composite primarykey commandeid, articleid, mandatid , foriengkey commandeid, mandatid --> commande articleid, mandatid --> article mandatid --> mandat

when try add or modify lignecommande had folowing exception:

the property " mandatid " part of key information of object , can not changed.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -