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);
                }
            }
        }
示例#2
0
        public void Post(Race race)
        {
            var command = new CreateRaceCommand();

            command.CreateRace(race);
        }