public Repository(IUnitOfWork unitOfWork) { Context = unitOfWork as EnglishTrainingDbContext; if (Context == null) { throw new InvalidOperationException("UnitOfWork of the type EnglishTrainingDbContext should be used while a entity framework data access are used."); } }
public TestDataInitializer(EnglishTrainingDbContext englishTrainingDbContext) { if (englishTrainingDbContext == null) { throw new ArgumentNullException(nameof(englishTrainingDbContext)); } _englishTrainingDbContext = englishTrainingDbContext; }