public IActionResult MarkaEdit(MarkaModel markamodel) { var entity = _markaService.GetById(markamodel.MarkaId); if (entity == null) { return(NotFound()); } entity.adi = markamodel.adi; entity.url = markamodel.url; _markaService.Update(entity); return(Redirect("/admin/marka/list")); }
public IActionResult GetById(int markaId) { var result = _markaService.GetById(markaId); if (result.Success) { return(Ok(result.Data)); } return(BadRequest(result.Message)); }