Min Aggregation Usage

edit

Fluent DSL example

edit
a => a
.Min("min_last_activity", m => m
    .Field(p => p.LastActivity)
)

Object Initializer syntax example

edit
new MinAggregation("min_last_activity", Field<Project>(p => p.LastActivity))

Example json output.

{
  "min_last_activity": {
    "min": {
      "field": "lastActivity"
    }
  }
}

Handling Responses

edit
response.ShouldBeValid();
var min = response.Aggregations.Min("min_last_activity");
min.Should().NotBeNull();
min.Value.Should().BeGreaterThan(0);
min.ValueAsString.Should().NotBeNullOrEmpty();