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); }
public UnitOfWorkTests() { var context = new ToGoDataContext(Effort.DbConnectionFactory.CreateTransient()); _unitOfWork = context.ToGo(); }