Skip to content

Instantly share code, notes, and snippets.

@allrameest
Last active December 26, 2015 15:29
Show Gist options
  • Save allrameest/7172848 to your computer and use it in GitHub Desktop.
Save allrameest/7172848 to your computer and use it in GitHub Desktop.
NHibernate FetchMany/Single
var existingCustomer = session.Query<Customer>()
.Where(c => c.CustomerId == imported.CustomerId)
.FetchMany(c => c.DeliveryAddresses)
.ToArray()
.SingleOrDefault();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment