Open arjensteinhauer opened 4 months ago
Will look into it.
Hi @borisdj, do you have an update on this?
The support for bulk reading from a sql view should be fairly easy I think. The when theIEntityType.GetTableName()
from Entity Framework Core returns null, IEntityType.GetViewName()
can be used as a second check?
Hi, when I try to use
BulkRead
to read entities from a SQL Server view, the method throws an exception 'Entity does not contain a table name'. When I look into the code, I think theIEntityType.GetTableName()
form Entity Framework Core is used. This method indeed will returnnull
for entities mapped to SQL views.IEntityType.GetViewName()
should probably be used instead.Is it possible to add support to BulkExtensions.BulkRead to read entities from a view? That would be great!
Versions being used by me at the moment:
entity definition:
DbContext:
Code to read (which throws the exception):
SQL Server view