I'm migrating an application from Access to a cloud-based solution. This access file has no relation defined and I've trouble importing data. For simplicity, I've exported the tables as CSV and tried to import with CSVHelper.
Consider this simple scenario
Book_ID;escription;BookType
Now in my csv I've got
1;A plague tale;Drama 2;Flowers and how to kill them;floriculture
I've created a BookType class, mapped to Table with EF Core with the form
[PK,Identity] GUID,Description
And the Book class as
[PK,Identity] GUID,BookDescription,[FK to BookType] FK_BookType
I don't know (and even don't know if it's possible) how to fill the relation. I mean
I can import the distinct values from CSV of BookType and insert them into the BookType table I don't know when I import the Books how to tell instead of the value put the Guid taken from the BookType.
I'm using ABP.io as Framework, so I've AutoMapper and the dependency injection, but I think I can't resolve the IRespository inside the Book's mapper.
Any suggestion?