How to deal with InMemoryDatabase used for tests
buthomas opened this issue · 2 comments
Hi
I'm currently investigating to use the CollectionParameters and/or Temp-Table feature in our project. Unfortunately we have a lot of tests that use the InMemoryDatabase. As far as I can see, there is no support for that DB provider. Is that correct? Do you have any suggestions how to deal with this situation?
One way might be to switch the tests to use SQLite. But then CollectionParameters aren't supported as well.
Thanks a lot.
Currently, the temp tables are implemented for sqlite and sql server only, but I can implement the missing components for in-memory provider yourself.
I didn't add support for in-memory provider because I'm using sqlite for my tests.
Alas, the collection parameters are supported with sql server only, there is no such thing in sqlite. If you have some ideas, then I'd like to know them :)
But, ...
- you can use temp tables as a workaround, if you switch to sqlite. For that you will need your own abstraction for definition/creation of collection parameters. By having an abstraction you can use the real methods (i.e. the ones for sql server) in production, otherwise you create a temp table.
- or, you implement the missing components for in-memory provider.
Thanks for you quick response. That's pretty much what I expected.