private TmDbContext GetContext() { var options = new DbContextOptionsBuilder <TmDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; var dataContext = new TmDbContext(options); dataContext.Database.EnsureCreated(); return(dataContext); }
public ProjectRepositoryTest() { _projects = new List <Project> { new Project { Id = "1", Name = "P1" }, new Project { Id = "2", Name = "P2" }, new Project { Id = "3", Name = "P3" } }; _dataContext = GetContext(); _unitOfWork = new UnitOfWork(_dataContext); }
public UnitOfWork(TmDbContext context) { _context = context; }
public Repository(TmDbContext context) { Context = context; }