public void Model_DataContext_Creation() { // Arrange var myDataContext = new CzechLearningContext(); // Act var words = myDataContext.Words; var word = words.First(); // Assert Assert.IsInstanceOfType(myDataContext, typeof(DbContext)); Assert.IsNotNull(words); Assert.IsNotNull(word); Assert.IsInstanceOfType(word, typeof(Word)); }
/// <summary> /// Default constructor. /// Populates word from a CzechLearningContext /// </summary> public QuizController() { var db = new CzechLearningContext(); Words = db.Words; }
public WordRepository(CzechLearningContext context) { this.context = context; }