MongoDB .NET Analyzer 1.1.0 Released

MongoDB .NET Analyzer 1.1.0 Release Notes

This is the general availability release for the 1.1.0 version of the analyzer.

The main new features in 1.1.0 include:

Builders variables tracking and composition

var filterScore = Builders<Movie>.Filter.Gt(p => p.Score, 5);
var filterTitle = Builders<Movie>.Filter.Regex(p => p.Title, "Summer");
var filterGenre = Builders<Movie>.Filter.Eq(p => p.Genre, Genre.Comedy);
 
// MQL is dispalyed for each filter variable
var filterCombined = filterTitle | filterScore | filterGenre;

// MQL for the combined filter is displayed
moviesCollection.Find(filterCombined);

Fluent API support

// MQL is displayed for the Fluent API methods
_ = moviesCollection
   .Find(u => u.Producer.Contains("Nolan"))
   .SortBy(u => u.Score)
   .ThenBy(u => u.Title);

LINQ Query syntax support

// MQL is displayed for LINQ expressions using query syntax 
var queryable = from movie in moviesCollection
    group movie by movie.Genre into g
    select g;

Builders IndexKeys support

// IndexKeys builder is analyzed 
_ = Builders<User>.IndexKeys.Ascending(x => x.Age);
_ = Builders<Shape>.IndexKeys.Geo2D(u => u.Point);

Builders Projections support

// Projection builder is analyzed 
_ = Builders<User>.Projection.Include(u => u.Age);
_ = Builders<Person>.Projection.Expression(u => u.Address);

The full list of JIRA issues resolved in this release is available at:

https://jira.mongodb.org/issues/?jql=project%20%3D%20VS%20AND%20fixVersion%20%3D%201.1.0

This topic was automatically closed after 90 days. New replies are no longer allowed.