陈斌彬的技术博客

Stay foolish,stay hungry

MagicalRecord Deleting-Entities

Deleting Entities

To delete a single entity in the default context:

[myPerson MR_deleteEntity];

To delete the entity from a specific context:

[myPerson MR_deleteEntityInContext:otherContext];

To truncate all entities from the default context:

[Person MR_truncateAll];

To truncate all entities in a specific context:

[Person MR_truncateAllInContext:otherContext];