Closed Oblomoff closed 1 year ago
@Oblomoff The in-memory database does not support changing the names of "tables" or "columns" since these are relational concepts. This means that the call to ToTable()
is ignored. There isn't a way to map entities with different names to the same "table" using the in-memory database.
Leaving issue open for now to discuss in triage.
Thanks
Triage: Adding to the backlog as something that would be useful to add in the future.
I would like to contribute to this. i am a first time contributor. please help me to kick start
@SARAVANA1501 We will discuss and get back to you.
@SARAVANA1501 Sorry for being slow here. After discussion, this is actually something that requires some more thought about how it should be designed/implemented. I have removed good-first-issue
here and added needs-design
. We have also done a scrub of good-first-issues
to try to make sure things are now correctly labeled.
Closing as this is no longer something we intend to implement. We instead plan to improve the experience when testing with the SQLite in-memory database.
I also stumbled upon this issue. We have multiple DbContext's (bounded contexts) sharing the same database and table but this breaks down when we are using the InMemoryDB in our unit tests. Is there any way (work around) to get this to work with InMemoryDb? This would really be useful. Is there any way to explicitly specify the "entity name",so that the In-Memory database knows that EntityClass1 is the same as EntityClass2?
@InspiringCode We recommend that you don't use the in-memory provider.
I try to use two different DbContexts (and different entities too!) with the same InMemory database. I created ContextAB which contains model that is compatible with both ContextA and ContextB. The following code works with SqlServer database, but fails with InMemory provider. What`s wrong?
Steps to reproduce
Further technical details
EF Core version: 2.2.3 Database Provider: Microsoft.EntityFrameworkCore.InMemory Operating system: Windows 10