Tahir Rehman

Tahir Rehman

  • NA
  • 14
  • 613

why require Foreign Key on insert recored into table Entity

Sep 24 2017 3:54 AM
in Student info there is primary key admission_no, that lies as foreign key on other tables. whenIi insert record in Student info a message show One or more validation errors was detected during model generation:
 
CodeFirstNamespace.admin_fee: : EntityType 'admin_fee' has no key defined. Define the key for this EntityType.
CodeFirstNamespace.month_fee: : EntityType 'month_fee' has no key defined. Define the key for this EntityType.
CodeFirstNamespace.result: : EntityType 'result' has no key defined. Define the key for this EntityType.
 
how I insert a record into Student info table

Answers (1)