Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save robinvanderknaap/b298040e2a48964695dd5cee277ad11c to your computer and use it in GitHub Desktop.
Save robinvanderknaap/b298040e2a48964695dd5cee277ad11c to your computer and use it in GitHub Desktop.
// Create factory for poco's and setup datasources
var pocoFactory = AutoPocoContainer.Configure(x =>
{
x.Conventions(c => c.UseDefaultConventions());
x.AddFromAssemblyContainingType<User>();
x.Include<User>()
.Setup(u => u.Email).Use<EmailAddressSource>()
.Setup(u => u.Firstname).Use<FirstNameSource>()
.Setup(u => u.Lastname).Use<LastNameSource>()
.Setup(u => u.DateOfBirth).Use<DateOfBirthSource>();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment