Record related entities EF6 c #

0

I have a structure in the DB (sql server) in which I have a main entity (patient) and other related (medicines, clinical parameters, activities, etc) is a one-to-many relationship, understanding that it could become that For example, have zero or more details for each teacher. In the database, of course, indicate the relationship between the detail tables and the patient table, which will use the update rule: Cascade, both for the insert / update, and for the delete.

At the moment of recording the patient and the related entities, which some have data and others do not, the following error is generated: "You can not use OriginalValues for entities in the Added state."

Does anyone know how I can solve this? I'm using EntityFramework 6.

Greetings

    
asked by Luis Gabriel Fabres 29.05.2017 в 04:20
source

0 answers