Project DescriptionMemoDb is a memory database that supports transactionability. MemoDb is for mocking Linq providers in unit testing environments.
//Creates a new MemoDb instance
var memo = new Memo()
.Map<City>();
//Creates a new MemoDb transactional session
using (var s = memo.CreateSession())
{
//Inserts a new item
s.Insert(new City
{
Id = 1,
Name = "Buenos Aires"
});
//Flushes the changes
s.Flush();
}
using (var s = memo.CreateSession())
{
var test = s.GetById<City>(1);
test.Name = "Bs As"; //Not flushed!
}
using (var s = memo.CreateSession())
{
var buenosAires = s.GetById<City>(1);
Assert.AreEqual("Buenos Aires", buenosAires.Name); //Changes were not flushed
}
Documentation is about to be done. In the meantime, you can find information about the usage in: