// GET: api/Concesionarios public IEnumerable <MarcaViewModel> Get() { return(marcaService.GetAll().Select(m => new MarcaViewModel() { Id = m.Id, Nombre = m.Nombre })); }
public ActionResult Buscar(string filterByName) { filterByName = filterByName != null ? filterByName : ""; var model = marcaServices.GetAll(filterByName); return(PartialView("IndexListado", model)); }
// GET: Producto public ActionResult IndexVM(ProductoSearchViewModel model) { model.Categorias = categoriaService.GetAll("").ToList(); model.Marcas = marcaService.GetAll("").ToList(); var filterByName = string.IsNullOrWhiteSpace(model.FilterByName) ? "" : model.FilterByName.Trim(); model.Productos = productoService.GetAll(filterByName, model.FilterByCategoria).ToList(); return(View(model)); }
public void Deve_remover_marcas_corretamente() { var marcaGuid = _testHelper.InsertMarca(); var marca = _marcaService.Find(marcaGuid); Assert.IsNotNull(marca); _marcaService.Remove(marca.Id); var response = _marcaService.GetAll(new MarcaFilter("")).FirstOrDefault(f => f.Id.Equals(marca.Id)); Assert.IsNull(response); }
// GET: Producto public ActionResult Index(string filterByName, int?filterByCategoria, int?filterByMarca) { filterByName = string.IsNullOrWhiteSpace(filterByName) ? "" : filterByName.Trim(); ViewBag.filterByName = filterByName; ViewBag.Categorias = categoriaService.GetAll(""); ViewBag.Marcas = marcaService.GetAll(""); var model = productoService.GetAll(filterByName, filterByCategoria, filterByMarca); return(View(model)); }
public IEnumerable <MarcaViewModel> ObterTodos(bool @readonly = false) { return(_mapper.Map <IEnumerable <MarcaViewModel> >(_marcaService.GetAll(@readonly))); }
public IActionResult GetAll() { var response = _marcaService.GetAll(); return(Ok(response.ObjectResponse)); }
// GET: Marca public ActionResult Index() { var model = marcaService.GetAll(""); return(View(model)); }
public IEnumerable<MarcaResponseViewModel> GetAll() { return _mapper.Map<IEnumerable<MarcaResponseViewModel>>(_marcaService.GetAll()); }
public IList <MarcaDTO> Get() { return(Service.GetAll()); }