add some convenient methods for CoreDataEnvir . change sample case.