Ejemplo n.º 1
0
        public async Task <ActionResult <IEnumerable <TaskAggregate> > > FilterTask([FromBody] FilterTaskArgs dto)
        {
            var result = await _tasksManager.FilterTasksAsync(dto);

            var list = result.list;

            if (result.fromCache)
            {
                Response.StatusCode = (int)_cacheFoundCode;
                return(new ActionResult <IEnumerable <TaskAggregate> >(list));
            }
            return(Ok(list));
        }
 public async Task <ActionResult <IEnumerable <TaskAggregate> > > FilterTask([FromBody] FilterTaskArgs dto)
 {
     return(Ok(await _tasksManager.FilterTasksAsync(dto)));
 }