// PUT: api/Arac/5 public IHttpActionResult Put(int id, [FromBody] Yonetici Yonetici) { Yonetici.YoneticiID = id; if (YoneticiBusiness.YoneticiIdSec(id) == null) { return(NotFound()); } else if (ModelState.IsValid == false) { return(BadRequest()); } else { return(Ok(YoneticiBusiness.YoneticiGuncelle(Yonetici))); } }
public Yonetici YoneticiIdSec(int id) { try { using (var business = new YoneticiBusiness()) { return(business.YoneticiIdSec(id)); } } catch (Exception) { throw; } }