Skip to content

Instantly share code, notes, and snippets.

@sibartlett
Created November 26, 2011 17:17
Show Gist options
  • Save sibartlett/1395991 to your computer and use it in GitHub Desktop.
Save sibartlett/1395991 to your computer and use it in GitHub Desktop.
MagicalRecord Example
NSArray *results = [Employee findAllInContext:self.managedObjectContext];
NSArray *results = [Employee findAll];
NSFetchRequest *request = [[NSFetchRequest alloc] init];
request.entity = [NSEntityDescription
entityForName:@"Employee" inManagedObjectContext:managedObjectContext];
NSArray *results =
[managedObjectContext executeFetchRequest:request error:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment