- (void)PRicticeCoreData
{
NSString *document = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)firstObject];
NSString *storePath = [document stringByAppendingPathComponent:@"lianxi.sqlite"];
NSURL *storeUrl = [NSURL URLWithString:storePath];
NSManagedObjectModel *mangerObjectModel = [[NSManagedObjectModel alloc]init];
NSPersistentStoreCoordinator *persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc]initWithManagedObjectModel:mangerObjectModel];
NSError *error = nil;
[persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:nilerror:&error];
NSManagedObjectContext *context = [[NSManagedObjectContext alloc]init];
[context setPersistentStoreCoordinator:persistentStoreCoordinator];
User *liwei = [[User alloc]initWithEntity:@"User"insertIntoManagedObjectContext:context];
liwei.username = @"liwei";
liwei.passWord = @"liwei";
[context save:&error];
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"User"];
NSArray *resultArray = [context executeFetchRequest:requesterror:nil];
[self.dataArray setArray:resultArray];
}