public IActionResult GetById([FromRoute] int id) { var response = _marcaService.GetById(id); if (response.ObjectResponse == null) { return(NotFound()); } return(Ok(response.ObjectResponse)); }
public ActionResult Create(string editAction, string marcaId) { MarcaDTO marcaDTO = new MarcaDTO(); switch (editAction) { case EditActionConstant.NEW: break; case EditActionConstant.EDIT: marcaDTO = marcaService.GetById(Convert.ToInt32(marcaId)); break; } return(PartialView(marcaDTO)); }
public MarcaViewModel ObterPorId(Guid id) { return(_mapper.Map <MarcaViewModel>(_marcaService.GetById(id))); }
public ActionResult Edit(int id) { var model = marcaService.GetById(id); return(View("Create", model)); }
public MarcaResponseViewModel GetById(Guid id) { return _mapper.Map<MarcaResponseViewModel>(_marcaService.GetById(id)); }