Have a case where I have destination tables that have several "layers" related by FK.
Root
|__A
|__B
|__C
|__D
I am importing some data from a flat file, projecting the results into a set of very similar POCO objects. From there I need to select from these POCO objects and into the entities. The question is how best to approach updating the entities given that each level can either be new or exists already and needs updated.
For example, the Root object itself might have already been created, but contains no A, therefore A must be created and then its dependent objects added.
Similar, Root might already exist as well as A, but not its dependent B. Each level has specific fields that need updated, if they already exist.
Aucun commentaire:
Enregistrer un commentaire