private static void TestConnectionCreationForTripleStore(LinqTripleStore ts1) { IRdfContext context = new RdfDataContext(ts1); QueryFactory<Track> factory = new QueryFactory<Track>(ts1.QueryMethod, context); IRdfQuery<Track> qry1 = context.ForType<Track>(); IRdfConnection<Track> rdfConnection = factory.CreateConnection(qry1); Assert.IsNotNull(rdfConnection); }
protected IEnumerator <T> RunQuery() { if (CachedResults != null && ShouldReuseResultset) { return(CachedResults.GetEnumerator()); } if (QueryText == null) { var sb = new StringBuilder(); CreateSelectQuery(sb); QueryText = sb.ToString(); } IRdfConnection <T> conn = QueryFactory.CreateConnection(this); IRdfCommand <T> cmd = conn.CreateCommand(); cmd.ElideDuplicates = Expressions.ContainsKey("Distinct") || Expressions.ContainsKey("Reduced"); cmd.CommandText = QueryText; cmd.InstanceName = GetInstanceName(); return(cmd.ExecuteQuery()); }