AutoPoco provided datasources

These can be assigned to properties on objects as described in Configuration

This list is quite small at the moment, and more shall be added over time as they are requested/contributed
  • LastNameSource
    • Picks a random sensible-looking last name from a built-in collection
  • FirstNameSource
    • Picks a random sensible-looking first name from a built-in collection
  • EmailAddressSource
    • Generates a unique e-mail address on every call to Next()
  • ValueSource (Object val)
    • Sets the value of the property to a hard-coded value
  • RandomStringSource (int x, int y)
    • Generates a random string between X and Y in length
  • DefaultStringSource
    • Used by the default conventions to set any unspecified strings to String.Empty
  • DefaultIntegerSource
    • Used by the default conventions to set any unspecified integers to 0
  • DefaultFloatSource
    • Used by the default conventions to set any unspecified floats to zero
  • ColorSource
    • Creates a random Color
  • CountrySource
    • Selects a random country (using the cultures available on the system)
  • CreditCardSource
    • Returns a credit card number from an internal collection
  • DateOfBirthSource
    • Returns a random date (this might be renamed to RandomDateSource
  • EnumerableSource<T> where T : Datasource
    • Generates a collection of objects from another data source
  • GuidSource
  • LoremIpsumSource
    • Generates a chunk of Lorem Ipsum text
  • UsStatesSource
    • Randomly returns a US State
  • AutoSource<T>
    • Uses the current session to generate an instance of T
    • Used by the default conventions on any complex types registered with the factory

Thanks to Khalid Abuhakme for contributing data sources to the project.

Last edited Apr 15, 2010 at 10:19 AM by robashton, version 2

Comments

PixelSyndicate Jun 10, 2015 at 6:18 PM 
No documentation on IntegerIdSource ?