Update NHRepository.cs

fix readonly field