This project has moved. For the latest updates, please go here.

Inserting Table-Per-Type entities

Aug 14, 2014 at 2:42 AM
Edited Aug 14, 2014 at 2:42 AM
Hi,

First of all, many thanks for your job, your library is really amazing. (reduced insert time from 5300ms to 72ms!). To generalize the using of bulkinsert in my app I also tried to use it on another table which is in TPT scheme but bulkinsert method only feed the parent table which represent the abstract class. No entry is added in child table which represent the derived class. Is there something to configure (specific mapping or cast) to enable bulkinsert in TPT mode?

I have a DbSet with the baseclass type:
public DbSet<Command> Commands { get; set; }

And to be in TPT mode I just used fluent API like this:
modelBuilder.Entity<CommandText>().ToTable("CommandsText");

many thanks for your help