Skip to content

Commit 19ab2e0

Browse files
authored
QF210603-1 -- C# example tweak from QF210602-1 (2.8) (couchbase#478)
1 parent 9093cf0 commit 19ab2e0

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

modules/csharp/examples/code_snippets/Program.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,7 +1671,6 @@ public static void testQuerySyntaxAll()
16711671
{
16721672
// For Documentation
16731673
var dbName = "travel-sample";
1674-
var this_Db = new Database(dbName) ;
16751674

16761675
string thisDocsId;
16771676
string thisDocsName;
@@ -1680,9 +1679,11 @@ public static void testQuerySyntaxAll()
16801679
Dictionary<string,object> hotel = new Dictionary<string,object>();
16811680

16821681
// tag::query-syntax-all[]
1682+
var this_Db = new Database("hotels") ;
1683+
16831684
var query = QueryBuilder
16841685
.Select(SelectResult.All())
1685-
.From(DataSource.Database(this_Db)); // <.>
1686+
.From(DataSource.Database(this_Db));
16861687

16871688
// end::query-syntax-all[]
16881689

@@ -1717,13 +1718,16 @@ private static void testQuerySyntaxProps()
17171718
{
17181719
// For Documentation
17191720
var dbName = "travel-sample";
1720-
var this_Db = new Database(dbName);
1721+
// var this_Db = new Database(dbName);
17211722

17221723
string thisDocsName;
17231724
string thisDocsType;
17241725
string thisDocsCity;
17251726
// tag::query-syntax-props[]
1727+
var this_Db = new Database("hotels") ;
1728+
17261729
Dictionary<string, object> hotel = new Dictionary<string, object>();
1730+
17271731
List<Dictionary<string, object>> hotels = new List<Dictionary<string, object>>();
17281732

17291733
var query = QueryBuilder.Select(
@@ -1750,7 +1754,6 @@ private static void testQuerySyntaxProps()
17501754

17511755
}
17521756

1753-
17541757
// end::query-access-props[]
17551758
} // test-query-access-props
17561759

@@ -1760,12 +1763,13 @@ private static void testQuerySyntaxCount()
17601763
{
17611764
// For Documentation
17621765
var dbName = "travel-sample";
1763-
var this_Db = new Database(dbName);
1766+
// var this_Db = new Database(dbName);
17641767

17651768
Dictionary<string, object> hotel = new Dictionary<string, object>();
17661769
List<Dictionary<string, object>> hotels = new List<Dictionary<string, object>>();
17671770

17681771
// tag::query-syntax-count-only[]
1772+
var this_Db = new Database("hotels") ;
17691773

17701774
var query =
17711775
QueryBuilder
@@ -1797,13 +1801,14 @@ private static void ibQueryForID()
17971801

17981802
// For Documentation
17991803
var dbName = "travel-sample";
1800-
var this_Db = new Database(dbName);
1804+
// var this_Db = new Database(dbName);
18011805

18021806
Dictionary<string, object> hotel = new Dictionary<string, object>();
18031807
List<Dictionary<string, object>> hotels = new List<Dictionary<string, object>>();
18041808

18051809

18061810
// tag::query-syntax-id[]
1811+
var this_Db = new Database("hotels") ;
18071812

18081813
var query = QueryBuilder
18091814
.Select(SelectResult.Expression(Meta.ID).As("this_ID"))
@@ -1830,9 +1835,10 @@ private static void testQueryPagination()
18301835
{
18311836
// For Documentation
18321837
var dbName = "travel-sample";
1833-
var this_Db = new Database(dbName);
1838+
// var this_Db = new Database(dbName);
18341839

18351840
// tag::query-syntax-pagination[]
1841+
var this_Db = new Database("hotels") ;
18361842

18371843
var thisLimit = 20;
18381844
var thisOffset = 0;

0 commit comments

Comments
 (0)