陈斌彬的技术博客

Stay foolish,stay hungry

MagicalRecord Creating-Entities

Creating Entities

To create and insert a new instance of an Entity in the default context, you can use:

Person *myPerson = [Person MR_createEntity];

To create and insert an entity into specific context:

Person *myPerson = [Person MR_createEntityInContext:otherContext];