It is possible to use EF with only an in memory DB that is not persisted in anyway kinda like what DataSet does. The information in the DB would only be required while the app is running and would not need to be retained. I have searched and studied but can’t find the answer.
1 Answer
You can use SQLite(http://www.sqlite.org/inmemorydb.html) in-memory database with entity framework. See these threads. http://sqlite.phxsoftware.com/forums/t/2604.aspx , Integration Testing Entity Framework code first with in-memory database
4 Comments
Canacourse
Thanks. Your answer suggests that this is not possible with EF out of the box. Is that correct?
Jayantha Lal Sirisena
no you got it wrong. what i am saying is you can use entity framework with in memory database and you can use SQLite as the in memory database.
Erik Funkenbusch
@Jayantha - your second link doesn't actually do what you say it does, it shows how to use CE4. Your first link suggests a way if you are not using code first, but most people seem to be using Code First these days.
Jayantha Lal Sirisena
@MystereMan. Hmm.. yeah. I just added the options we have. Thanks for the comment.