Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSVDataLoader not populating base class (TPH) #67

Open
maganuk opened this issue Feb 18, 2017 · 0 comments
Open

CSVDataLoader not populating base class (TPH) #67

maganuk opened this issue Feb 18, 2017 · 0 comments

Comments

@maganuk
Copy link

maganuk commented Feb 18, 2017

Hi,

One of my entities is using the Table per Hierarchy model as follows:

[Table("Books")]
public class Book
{
    public int ID { get; set; }
}

public class Magazine : Book
{
    public string Title { get; set; }
}

public class Novel : Book
{
    public string ISBN { get; set; }
}

My CSV file is titled Books.csv and has ID, Title, ISBN, Discriminator

Everything else in the database (which is not TPH) is getting loaded perfectly fine, but the DbSet of Books, Magazines and Novels is always empty. It works fine if I manually add an entity using the context and do save changes.

Could you please point me in the right direction?

Thanks
Best Regards

Vishal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant