Exemplo n.º 1
0
 public IActionResult GetPost(
     [FromQuery] PostSearch search,
     [FromServices] IGetPostQuery query)
 {
     return(Ok(executor.ExecuteQuery(query, search)));
 }
Exemplo n.º 2
0
 public IActionResult Get(int id, [FromServices] IGetPostQuery query)
 {
     return(Ok(_executor.ExecuteQuery(query, id)));
 }
Exemplo n.º 3
0
 public PostController(IGetPostQuery getPostsQuery)
 {
     this.getPostsQuery = getPostsQuery;
 }