public void Seed() { using (var db = new LiteDatabase(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "MyData.db"))) { if (db.CollectionExists("Race")) { return; } var command = new CreateRaceCommand(); foreach (var data in SeedData()) { command.CreateRace(data); } } }
public void Post(Race race) { var command = new CreateRaceCommand(); command.CreateRace(race); }