public IActionResult Create(KlhkSents model) { _klhkSentRepo.Add(model); //return Created("GetKlhkSents", new { id = model.ID.ToString() }, model); return(StatusCode(201)); // return Created(); }
public IActionResult Edit(KlhkSents model, int?id) { KlhkSents klhkSents = _klhkSentRepo.FindByID(id.Value); if (klhkSents == null) { return(StatusCode(404)); // return NotFound(); } _klhkSentRepo.ApiUpdate(model, id.Value); return(Ok(model)); // return StatusCode(200); }
// GET: KlhkSents/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(NotFound()); } KlhkSents objKlhkSents = _klhkSentRepo.FindByID(id.Value); if (objKlhkSents == null) { return(NotFound()); } return(View(objKlhkSents)); }