Skip to content

Instantly share code, notes, and snippets.

@ashic
Created July 29, 2011 10:15
Show Gist options
  • Save ashic/1113568 to your computer and use it in GitHub Desktop.
Save ashic/1113568 to your computer and use it in GitHub Desktop.
Possible Insert If syntax
db.In<Person>().Insert(()=> new Person{ Name = "John", Age = 5, Id = 5 })
.IfNotExists(()=> new Person{Name = "John", Age = 5});
//intentionally kept the id out.
//This'll mean that we can handle creates in a kind of idempotent manner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment