Created
July 29, 2011 10:15
-
-
Save ashic/1113568 to your computer and use it in GitHub Desktop.
Possible Insert If syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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