コード例 #1
0
 public async Task <IActionResult> FetchVenues([FromQuery(Name = "page")] int page = 0, [FromQuery(Name = "count")] int count = 20)
 {
     return(await venues.FetchOrderedVenues(page, count)
            .Ensure(v => v.HasValue, "Venues were found")
            .OnBoth(v => v.IsFailure ? StatusCode(404, "") : StatusCode(200, v.Value.Value))
            .ConfigureAwait(false));
 }