public async Task <IActionResult> Get ( string alias = null, [FromQuery] string[] tags = null, [Whitelist(10, 20, 30)] int?pageSize = 10, [FromQuery, Range(0, int.MaxValue)] int?pageIndex = 0, [FromQuery] string sortBy = null, [FromQuery] string sortAs = null ) { Paged <Location> result = await this.mediator.Send(new GetLocationsQuery(alias, tags, pageSize, pageIndex, sortBy, sortAs)); return(Ok(result.Adapt(this.mapper))); }
public async Task <IActionResult> Get ( string name, double?cost, int?duration, [Whitelist(10, 20, 30)] int?pageSize = 10, [FromQuery, Range(0, int.MaxValue)] int?pageIndex = 0, [FromQuery] string sortBy = null, [FromQuery] string sortAs = null ) { Paged <TaskType> result = await this.mediator.Send(new GetTaskTypesQuery(name, cost, duration, pageSize, pageIndex, sortBy, sortAs)); return(Ok(result.Adapt(this.mapper))); }
public async Task <IActionResult> Get ( string name, int?type, DateTimeOffset?intervalStart, DateTimeOffset?intervalEnd, int?status, [Whitelist(10, 20, 30)] int?pageSize = 10, [FromQuery, Range(0, int.MaxValue)] int?pageIndex = 0, [FromQuery] string sortBy = null, [FromQuery] string sortAs = null ) { Paged <Domain.Entities.Task> result = await this.mediator.Send(new GetTasksQuery(name, type, intervalStart, intervalEnd, status, pageSize, pageIndex, sortBy, sortAs)); return(Ok(result.Adapt(this.mapper))); }