Example #1
0
 // POST: api/Arac
 public IHttpActionResult Post([FromBody] Yonetici Yonetici)
 {
     if (ModelState.IsValid)
     {
         var olusturulanYonetici = YoneticiBusiness.YoneticiEkle(Yonetici);
         return(CreatedAtRoute("DefaultApi", new { id = olusturulanYonetici.YoneticiID }, olusturulanYonetici));
     }
     return(BadRequest());
 }
Example #2
0
 public bool YoneticiEkle(Yonetici entity)
 {
     try
     {
         using (var business = new YoneticiBusiness())
         {
             business.YoneticiEkle(entity);
         }
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }