altmann / CherrySeed

Seeding data from any source to any destination using .NET
MIT License
29 stars 5 forks source link
CherrySeed

What is CherrySeed?

CherrySeed is a simple .NET library built to solve a common problem - creating and seeding test data into the database. This type of code is boring to write and bringing relations under control is hard, so why not use a library for that?

Why use CherrySeed?

How do I use CherrySeed?

var config = new CherrySeedConfiguration(cfg =>
{
    // set data provider
    cfg.WithDataProvider(new CsvDataProvider());

    // set repository
    cfg.WithGlobalRepository(new EfRepository());

    // set entity specific settings
    cfg.ForEntity<Person>()
        .WithPrimaryKey(e => e.Identification);
});

var cherrySeeder = config.CreateSeeder();
cherrySeeder.Seed();

More see in Getting Started.

Resources

Copyright

Copyright (c) Michael Altmann. See LICENSE for details.