Added locking behavior to IDataRepository and DataRepository.