Example #1
0
 // 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)));
     }
 }
Example #2
0
 public Yonetici YoneticiIdSec(int id)
 {
     try
     {
         using (var business = new YoneticiBusiness())
         {
             return(business.YoneticiIdSec(id));
         }
     }
     catch (Exception)
     {
         throw;
     }
 }