Example #1
0
        public static void Seed(ZenContext context)
        {
            _ptBr = context.Languages.Where(o => o.Code == "PT-BR").First();
            _en   = context.Languages.Where(o => o.Code == "EN").First();

            _tags = GetTags().ToDictionary(k => k.Name, v => v);
            context.Tags.AddRange(_tags.Values);
            context.SaveChanges();

            context.ZenQuotes.AddRange(GetQuotes1());
            context.SaveChanges();
        }
Example #2
0
 public ZenContextSeedData(ZenContext context)
 {
     _context = context;
 }