// GET: Products/Create
 public ActionResult Create()
 {
     ViewBag.Manufacturers = new SelectList(_getManufacturers.Execute(), "ManufacturerId", "Name");
     ViewBag.Categories    = new SelectList(_getCategories.Execute(), "CategoryId", "Name");
     ViewBag.Suppliers     = new SelectList(_getSuppliers.Execute(), "SupplierId", "Name");
     return(View());
 }
예제 #2
0
 public IActionResult Get([FromQuery] ManufacturerQuery query)
 {
     try
     {
         return(Ok(_getManufacturersCommand.Execute(query)));
     }
     catch (EntityNotFoundException)
     {
         return(NotFound());
     }
 }
 // GET: Manufacturer
 public ActionResult Index(ManufacturerQuery request)
 {
     return(View(_getManufacturers.Execute(request)));
 }