예제 #1
0
 public void OnGet(
     [FromServices] GetProductsByCategoryName getProductsByCategoryName,
     [FromServices] GetCategory getCategory,
     string name)
 {
     Products = getProductsByCategoryName.Do(name);
     Category = getCategory.Do(name);
 }
예제 #2
0
 public IActionResult GetCategory(
     Guid id,
     [FromServices] GetCategory getCategory) =>
 Ok(getCategory.Do(id));
예제 #3
0
        public IActionResult GetCategory([FromServices] GetCategory getCategory, string name)
        {
            var categories = getCategory.Do(name);

            return(Ok(categories));
        }