public ActionResult Update(Guid id) { Pettype pet = _pettypeService.GetByID(id); PettypeDTO model = new PettypeDTO(); model.ID = pet.ID; model.PettypeName = pet.PettypeName; model.PettypeDescription = pet.PettypeDescription; model.SeoTitle = pet.SeoTitle; model.SeoDescription = pet.SeoDescription; return(View(model)); }
public ActionResult Update(PettypeDTO data) { Pettype pet = _pettypeService.GetByID(data.ID); pet.ID = data.ID; pet.PettypeName = data.PettypeName; pet.PettypeDescription = data.PettypeDescription; pet.SeoTitle = data.SeoTitle; pet.SeoDescription = data.SeoDescription; _pettypeService.Update(pet); TempData["Successful"] = "Transaction is successful."; return(Redirect("/Admin/Pettype/List")); }