public ActionResult Filter(string category, string gadgetName) { var viewModelGadgets = gadgetService.GetCategoryGadgets(category, gadgetName); return(View(viewModelGadgets)); }
public ActionResult Filter(string category, string gadgetName) { var gadgets = gadgetService.GetCategoryGadgets(category, gadgetName); var viewModelGadgets = Mapper.Map <IEnumerable <Gadget>, IEnumerable <GadgetViewModel> >(gadgets); return(View(viewModelGadgets)); }
public ActionResult Filter(string category, string gadgetName) { IEnumerable <GadgetVM> gadgetVM; IEnumerable <Gadget> gadgets; gadgets = gadgetService.GetCategoryGadgets(category, gadgetName); gadgetVM = Mapper.Map <IEnumerable <Gadget>, IEnumerable <GadgetVM> >(gadgets); return(View(gadgetVM)); }