public static void Initialize(PhraseDbContext dbContext)
 {
     dbContext.Database.EnsureCreated();
     if (!dbContext.Phrases.Any())
     {
         dbContext.Phrases.Add(new Phrase()
         {
             Text = "test prvohg testa "
         });
         dbContext.Phrases.Add(new Phrase()
         {
             Text = "test prvohg texta "
         });
         dbContext.Phrases.Add(new Phrase()
         {
             Text = "Inicijalni podaci pri startupu "
         });
     }
 }
Exemple #2
0
 public UnitOfWork(PhraseDbContext context)
 {
     _context = context;
 }