public void SeedUsers(LanguagerContext context) { var user = new User("Oleksandr Kalashnykov", "okalashnykov"); context.Users.Add(user); context.SaveChanges(); }
public void SeedLanguages(LanguagerContext context) { var languages = new[] { new Language("english") }; context.Languages.AddRange(languages); context.SaveChanges(); }
public void SeedSyllables(LanguagerContext context) { var syllables = new List <Syllable>(); syllables.AddRange(Syllabary.Hiragana); syllables.AddRange(Syllabary.Katakana); foreach (var syllable in syllables) { if (!context.Syllables.Any(s => s.Value == syllable.Value)) { context.Syllables.Add(syllable); } } context.SaveChanges(); }