对coreData中得到context的封装
+(NSManagedObjectContext *)getContext{
NSManagedObjectModel * model=[NSManagedObjectModel mergedModelFromBundles:nil];
NSPersistentStoreCoordinator * psc=[[NSPersistentStoreCoordinator alloc]initWithManagedObjectModel:model];
NSString * path=[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)firstObject];
path=[path stringByAppendingPathComponent:@"tel.sqlite"];
NSLog(@"%@",path);
NSURL * url=[[NSURL alloc]initFileURLWithPath:path];
[psc addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:url options:nil error:nil];
NSManagedObjectContext * con=[[NSManagedObjectContext alloc]init];
con.persistentStoreCoordinator=psc;
return con;
}