I am trying to use Sqlite as a memory database with ServiceStack ORMlite in my unit tests.
If I run my tests while saving SQLite to a file, i.e. using a connection string
"Data Source=|DataDirectory|unittest.db;Version=3;"
it works fine and authentication tables are generated perfectly with ServiceStacks
userRepository.CreateMissingTables();
However, when I try to use SQLite as a memory database using this connectionstring
":memory:"
I get an exception by saying
SQLite error no such table: UserAuth
the first time I try to extract a user by doing this
userRepository.GetUserAuthByUserName(...)
This is after I called userRepository.CreateMissingTables (), and it works fine if I switch to using SQLite with a file database. Does anyone know what the problem is? (I had to downgrade the class to version 3.9.0 from ORMLite due to poor references to version 1.0.65.0 of ORM lite in Ormlite 3.9.4)
source share