Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
struct MyModelDTO {
let property1: Type1
let property2: Type2
}
extension MyModelDTO {
init(model: MyModel_CoreData) {
self.init(property1: model.property1, property2: model.property2)
}
}
class MyModel_CoreData: NSManagedObject {
@NSManaged var property1: Type1
@NSManaged var property2: Type2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment