Skip to content

Commit

Permalink
Add child collection linq example
Browse files Browse the repository at this point in the history
* Fix breadcrumb background
* Update CI link to AppVeyor
  • Loading branch information
joemcbride authored and jeremydmiller committed Oct 12, 2017
1 parent 40c2e68 commit cfa0bdd
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -221,4 +221,5 @@ src/DinnerParty/public/*.map

doc-target

BenchmarkDotNet.Artifacts
BenchmarkDotNet.Artifacts
*.DS_Store
3 changes: 2 additions & 1 deletion Gemfile.lock
Expand Up @@ -4,11 +4,12 @@ GEM
rake (10.0.0)

PLATFORMS
ruby
x86-mingw32

DEPENDENCIES
bundler (>= 1.3.5)
rake (= 10.0.0)

BUNDLED WITH
1.12.5
1.14.6
4 changes: 4 additions & 0 deletions documentation/content/theme.css
Expand Up @@ -42,4 +42,8 @@ i.command-description {

.command-section h4 {
margin-bottom: 10px;
}

.navbar-inverse {
background-color: transparent;
}
12 changes: 6 additions & 6 deletions documentation/splash.htm
Expand Up @@ -50,7 +50,7 @@
<a href="https://gitter.im/JasperFx/Marten?utm_source=share-link&utm_medium=link&utm_campaign=share-link" onclick = $("#menu-close").click(); >Gitter Room</a>
</li>
<li>
<a href="http://build.fubu-project.org/project.html?projectId=Marten&branch_Marten=__all_branches__" onclick = $("#menu-close").click(); >TeamCity Page</a>
<a href="https://ci.appveyor.com/project/jasper-ci/marten/history" onclick = $("#menu-close").click(); >AppVeyor</a>
</li>
<li>
<a href="https://www.nuget.org/packages/Marten/" onclick = $("#menu-close").click(); >Nuget Downloads</a>
Expand All @@ -68,16 +68,16 @@
<img src="http://jasperfx.github.io/marten/content/images/banner.png" width="80%" align="middle"/>
<h1 style="color:white">Marten</h1>
<h3>Postgresql as Document Db &amp; Event Store for .Net Development</h3>

<h2>Polyglot Persistence for .Net Systems using the Rock Solid Postgresql Database</h2>
<p class="lead">
<a href="http://build.fubu-project.org/project.html?projectId=Marten&tab=projectOverview"><img src="https://img.shields.io/teamcity/http/build.fubu-project.org/s/marten_master.svg"></img></a>
<a href="https://ci.appveyor.com/project/jasper-ci/marten/history"><img src="https://img.shields.io/appveyor/ci/jasper-ci/marten.svg"></img></a>
<a href="https://www.nuget.org/packages/Marten/"><img src="https://img.shields.io/nuget/v/Marten.svg"></img></a>


<a href="https://gitter.im/jasperfx/marten?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://camo.githubusercontent.com/da2edb525cde1455a622c58c0effc3a90b9a181c/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667" alt="Join the chat at https://gitter.im/jasperfx/marten" data-canonical-src="https://badges.gitter.im/Join%20Chat.svg" style="max-width:100%;"></a>
</p>

<br>
<a href="#about" class="btn btn-dark btn-lg">Find Out More</a>
<a href="getting_started" class="btn btn-dark btn-lg">Get started!</a>
Expand Down Expand Up @@ -105,7 +105,7 @@ <h2>Polyglot Persistence for .Net Systems using the Rock Solid Postgresql Databa
<h2>Document Database</h2>
<p>The Marten library provides .Net developers with the ability to easily use the proven <a href="http://www.postgresql.org">Postgresql database engine</a>
and its <a href="https://www.compose.io/articles/is-postgresql-your-next-json-database/">fantastic JSON support</a> as a fully fledged <a href="https://en.wikipedia.org/wiki/Document-oriented_database">document database</a>. The Marten team believes that a document database has far reaching benefits for developer productivity
over relational databases with or without an ORM tool.
over relational databases with or without an ORM tool.
</p>
<p><a class="btn btn-default" href="<[linkto:documentation/documents;{href}]>" role="button">View details &raquo;</a></p>
</div>
Expand Down Expand Up @@ -147,7 +147,7 @@ <h2>Event Store</h2>



});
});

</script>

Expand Down
Expand Up @@ -25,6 +25,8 @@ public void searching(IDocumentStore store)
{
using (var session = store.QuerySession())
{
var searchNames = new string[] { "Ben", "Luke" };

session.Query<ClassWithChildCollections>()
// Where collections of deep objects
.Where(x => x.Companies.Any(_ => _.Name == "Jeremy"))
Expand All @@ -39,11 +41,15 @@ public void searching(IDocumentStore store)
.Where(x => x.NameList2.Contains("Jens"))

// Where for Any(element == value) on simple types
.Where(x => x.Names.Any(_ => _ == "Phillip"));

.Where(x => x.Names.Any(_ => _ == "Phillip"))

// The Contains() operator on subqueries within Any() searches
// only supports constant array of String or Guid expressions.
// Both the property being searched (Names) and the values
// being compared (searchNames) need to be arrays.
.Where(x => x.Names.Any(_ => searchNames.Contains(_)));
}
}
}
// ENDSAMPLE
}
}

0 comments on commit cfa0bdd

Please sign in to comment.