protected ToGoDataContext GetDbContext()
        {
            var builder = new DbContextOptionsBuilder <ToGoDataContext>();

            builder.UseInMemoryDatabase("ToGo");

            var toGoDataContext = new ToGoDataContext(builder.Options);

            toGoDataContext.Database.EnsureDeleted();
            toGoDataContext.Database.EnsureCreated();

            return(toGoDataContext);
        }
Exemple #2
0
        public UnitOfWorkTests()
        {
            var context = new ToGoDataContext(Effort.DbConnectionFactory.CreateTransient());

            _unitOfWork = context.ToGo();
        }