Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 487 Bytes

Creating-Entities.md

File metadata and controls

26 lines (19 loc) · 487 Bytes

Creating Entities

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

// Objective-C
Person *myPerson = [Person MR_createEntity];
// Swift
let myPerson = Person.mr_createEntity()

To create and insert an entity into specific context:

// Objective-C
Person *myPerson = [Person MR_createEntityInContext:otherContext];
// Swift
let myPerson = Person.mr_createEntity(in: otherContext)