dependentcy injection

Feb 2, 2015 at 12:36 AM

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.

Feb 2, 2015 at 11: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.