예제 #1
0
 public IActionResult Get(
     [FromQuery] PostSearch search,
     [FromServices] IGetPostsQuery query)
 {
     try
     {
         return(Ok(_executor.ExecuteQuery(query, search)));
     }
     catch (Exception)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError));
     }
 }
예제 #2
0
 public IActionResult Get(
     [FromQuery] PostSearch search,
     [FromServices] IGetPostsQuery query)
 {
     return(Ok(_executor.ExecuteQuery(query, search)));
 }