Skip to content

Datasource List

reddy6ue edited this page Sep 4, 2017 · 2 revisions

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
    • Generates a "random" guid (but in a repeatable fashion)
    • Note: This cannot be used for guid generation as the algorithm repeats
  • 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
Clone this wiki locally