I\'ve this confusion all the time. If I write a code which uses fake code to assert some operation, how do i trust my real implementation when it is started really using the
You use stubs when you just want a function to return some value (or do nothing). You don't really care if the function was called or not, you just want to isolate things.
Mocks are more powerful, as you can also keep track if the function was called, how many times, and even do things with values your function gets.
In your case, if you want to mock the database (so it becomes a unit test rather than a functional one), you can mock ISession and ITransaction. You could then store this values in-memory, and check if the correct values were saved.