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

            return(Ok(categories));
        }