public bool AracInsert(araclar item) { try { using (var araclar = new AraclarRepository()) { araclar.AracInsert(item); } return(true); } catch (Exception) { return(false); } }
public IHttpActionResult AracEkle(araclar araba) { var content = new ResponseContent <araclar>(null); if (araba != null) { using (var ar = new AraclarRepository()) { content.Result = ar.AracInsert(araba) ? "1" : "0"; return(new StandartResult <araclar>(content, Request)); } } content.Result = "0"; return(new StandartResult <araclar>(content, Request)); }