dependentcy injection

Feb 1, 2015 at 11:36 PM
Hi

Do you have some example that use dependency injection with nrepository ? My use case is : I use entityframework for my api and i want use memory repository or mongo repository for unit test.


Thanks
Coordinator
Feb 2, 2015 at 10:13 PM
Yeah. The sample code, NRepository.Samples, found in the download area has examples using Unity dependency injection. For Unity configuration details see UnityConfig.cs.

Also look at the test code, there's examples using the InMemoryRepository for unit testing.