I have a two entity "Person" and "Car" is coming from the web service. I need to store that in sqlite through core data. I want to know what is the best approach should i bind the save method with NSmanagedobject or write differently in utility or manager?
**Approach 1**
@interface Person : NSManagedObject
@property (nonatomic, retain) NSString * title;
- (void) saveManagedObject:(NSDictionary*)response //Responsible for init the person object and save in context
@end
**Approach 2**
@interface CoreDataUtility : NSObject
- (void) saveManagedObject:(NSDictionary*)response //Responsible for create the person object and save in context
@end
Aucun commentaire:
Enregistrer un commentaire