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 " }); } }
public UnitOfWork(PhraseDbContext context) { _context = context; }