Let say I got the following code in my SqlUserRepository :
var user = from u in NHibernateLinqContext.Linq<User>() ...
What I would like is to have a similar context for my FakeuserRepository
var user = from u in FakeLinqContext.Linq<User>() ...
Like that, I'll be able to use the same logic in my SqlUserRespository that my FakeUserRepository. But, I don't know how Linq context work and how I can be able to create one for my FakeUserRepository.
Ideally I would like that, by example, my AnythingUserRepository
take a context in constructor parameter.
Example :
SqlUserRepository() : base(NHibernateLinqcontext)
FakeUserRepository() : base(FakeLinqcontext)
Any idea how I can achieve that ?